This template utilize YAML file as Serverless Framework config.
For Typescript config, (delete serverless*.yaml after running the command) run:
npx serverless-yaml2ts
- Clone this project
- Install packages:
npm install
- Run local:
sls offline -s dev
- Start developing ๐
(https://www.serverless.com/framework/docs/environment-variables)
Project enviroment variables will be injected when bootstrapping from file as structured:
# .env.dev
FOO=BAR
HELLO=WORLD
- filename:
.env.{stage}
will define which file to inject during the bootstrap (e.g..env.dev
gets picked up duringsls offline -s dev
) - For
sls deploy
, required environments has to be defined in Serverless config file (read here) - Environment variables will be injected regardlessly during
sls offline