serverless-wrap
A tiny wrap around serverless, which executes the serverless command.
An excellent candidate to deploy serverless projects in a uniform fashion no matter where it's used and easily integrates with node task runners (e.g.: npm and gulp)
Install
$ npm install --save serverless-wrap
Usage
imports
// default import // named import; // multiple named imports;
deploy
const args = '--region' 'eu-west-1' '--stage' 'development' '--verbose'; await serverless;
execute
Used to execute any serverless command.
const args = '--region' 'eu-west-1' '--stage' 'development' '--verbose'; await serverless;
environment variables
dotenv is supported; any environment variables are passed on to the serverless command.
const dotenv = ;/* * loads configuration from the .env file, e.g.: * process.env.AWS_ACCESS_KEY_ID * process.env.AWS_SECRET_ACCESS_KEY * process.env.AWS_REGION */dotenv; // makes use of the process.env variablesawait serverless;