Step by step guide to building a Serverless service with Node.js.
Have a quick read of the prerequisites below, then jump into Step 1!
This project uses Amazon Web Services (AWS) to host the service. You can build and test the code without an account, but it's much more fun to deploy it! If you don't qualify for the AWS free tier, this project will cost no more than a few pennies. You will use the Lambda and API Gateway services.
You'll need Node.js installed for this project. At the time of writing, AWS Lambda uses version 4.3.2 of Node , so I recommend you use the same. I use nvm to manage Node versions - there are alternatives listed for Windows users in the nvm README.
To follow this guide, simply clone this repo and follow the tutorial steps. If you get stuck at ay point, there is a branch that represents the project at the end of each step. For example, the Step 1 branch represents what your project should look like (minus gitignored files) at the end of Step 1.
If you check out a branch, be sure to run
npm installto make sure that all dependencies are installed and the code is compiled.