loopback4-cloudfront
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0 • Public • Published

    loopback4-cloudfront

    Installation

    Install CloudfrontComponent using npm;

    $ npm install loopback4-cloudfront

    Basic Use

    Configure and load CloudfrontComponent in the application constructor as shown below.

    import {CloudFrontComponent, CloudfrontComponentOptions} from 'loopback4-cloudfront';
    // ...
    export class MyApplication extends BootMixin(ServiceMixin(RepositoryMixin(RestApplication))) {
      constructor(options: ApplicationConfig = {}) {
        // To configure component
        this.configure(CloudFrontBindings.COMPONENT).to({
          enableCloudFront: false, // Default to true
          enableCloudFrontSigner: true // Default to false
        });
    
        // To configure Cloudfront
        this.configure(CloudFrontBindings.CLOUD_FRONT_CONFIG).to(...);
        });
    
        // To configure Cloudfront Signer
        this.configure(CloudFrontBindings.SIGNER_CONFIG).to({
            keyPairId: 'your_keyPairId',
            privateKey: 'your_privateKey',
          });
        });
    
        this.component(CloudfrontComponent);
        // ...
      }
      // ...
    }

    Install

    npm i loopback4-cloudfront

    DownloadsWeekly Downloads

    3

    Version

    2.0.0

    License

    none

    Unpacked Size

    17.3 kB

    Total Files

    27

    Last publish

    Collaborators

    • mrbatista