JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q22615F
  • License MIT

Deploy a fullstack serverless web app (including React, Angular, Node.js, Python) with an AWS CloudFront distribution in front of your API Gateway and static content from S3. Use your own custom domain, SSL from AWS, and AWS Web Application Firewall.

Package Exports

  • export-serverless
  • export-serverless/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (export-serverless) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

export-serverless

A serverless plugin that interpolates serverless config so that you can use it more flexibly.

Home page - https://github.com/anonflux/export-serverless

⚡ Pros

  • TBD

Before you begin

  • Install the serverless framework
npm install -g serverless

Getting started

First, Install and configure

Installation

npm install --save-dev export-serverless

Configuration

In real world scenarios, there is more to ensuring quality than simply deploying the application. In applications using the serverless framework, this often presents a problem, as configuration is only available within the context of serverless commands.

Not anymore. This plugin will export serverless.yml configuration, interpolations, variables, etc to a file of your choosing.

# add to your serverless.yml

plugins:
  - export-serverless

custom:
  export:
    toFile: './.service.config.json'    # relative to process.cwd() file name/path config will be written to
    config:                             # the output of the config file will be json objects that match this object
      service:
        name: 'service'                 # value corresponds to the 'service' property in serverless.yml
      stackName: 'provider.stackName'   # value corresponds to the 'provider.stackName' property in serverless.yml
      envKey: 'custom.env-key'          # value corresponds to the 'custom.env-key' property in serverless.yml

For example, if serverless.yml looked like this:

# add to your serverless.yml
service: exporty-sport-port
provider:
  stage: ${opt:stage, 'local'}
  stackName: ${self:provider.stage}-${self:service}
custom:
  env-key: ${self:provider.stage}
  export:
    toFile: './.service.config.json'
    config:
      service:
        name: 'service'
      stackName: 'provider.stackName'
      envKey: 'custom.env-key'  
plugins:
  - export-serverless

When running npx sls export, the ./service.config.json file would look like this:

{
    "service": {
        "name": "exporty-sport-port"
    },
    "stackName": "local-exporty-sport-port",
    "envKey": "local"
}

To run

  • npx sls export
  • npx sls export --stage={stagehere}