Skip to content

neverendingqs/serverless-dotenv-example

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
d64f27a

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

serverless-dotenv-example

This is a simple example to how you can use dotenv with the Serverless Framework without using a plugin.

See the example in action by running the following:

npm i
npm run sls -- package

The logs and .serverless/cloudformation-template-update-stack.json show env vars being loaded by dotenv as expected.

Got a question or want to see more examples like this? Be sure to check out my AMA repo!