0.1.0 • Published 5 years ago
serverless-offline-variables v0.1.0
serverless-offline-variables
About
serverless-offline-variables is a lightweight plugin to replace ${cf:}, ${s3:}, ${ssm:} and ${env:}
parameters during the local (offline) runs, which can be very useful when testing microservices in isolation.
Installation
Use yarn or npm to add the plugin to your package dependecies:
npm install --save-dev serverless-offline-variablesor
yarn add serverless-offline-variables --devUsage
- Add plugin to you serverless plugins
plugins:
...
- serverless-offline-variables- Configure plugin (optional)
custom:
...
offline-variables:
stages:
- local # Default
file: .env # Default
variables: # Optional
- ssm:hello-world: my valueBy default plugin will first try to locate your variable in .env file
(or in the file you specified), and only then under the variables section.
If serverless-offline-variables fails to locate a variable it falls back
to original resolver.
Contributions
You are welcome to create pull requests to improve the project. Please check out the contribution quick guide to get started.
License
The project is distributed under MIT license.