To create a new Serverless project.
$ serverless install --url https://github.com/AnomalyInnovations/serverless-nodejs-starter --name my-project
Enter the new directory
$ cd my-project
Install the Node.js packages
$ npm install
To run unit tests on your local
$ npm test
To run a function on your local
$ serverless invoke local --function hello
To simulate API Gateway locally using serverless-offline
$ serverless offline start
Run your tests
$ npm test
We use Jest to run our tests. You can read more about setting up your tests here.
Deploy your project
$ serverless deploy
Deploy a single function
$ serverless deploy function --function hello