- Node.js
- Serverless CLI
Define these environment variables in serverless.env.yml
file
dev:
NODE_ENV
MONGODB_URI
MONGODB_DATABASE
MONGODB_INVOICES_COLLECTION
MONGODB_CLIENTS_COLLECTION
test:
NODE_ENV
MONGODB_URI
MONGODB_DATABASE
MONGODB_INVOICES_COLLECTION
MONGODB_CLIENTS_COLLECTION
prod:
NODE_ENV
MONGODB_URI
MONGODB_DATABASE
MONGODB_INVOICES_COLLECTION
MONGODB_CLIENTS_COLLECTION
npm install
serverless deploy -s dev
Run the tests using npm test
Run linting using ./node_modules/.bin/eslint "**/*.js"