A base express API server wrapped in AWS lambda
Act as the template Express server. Come with scritps to help provision necessary AWS resources to host and develop the server.
- Clone the project.
yarn init
to reconfigure your project.yarn install
to install all npm dependencies.yarn start
to start your server locally.- Verify that the API server is working by sending a GET request to /version. i.e:
curl localhost:3000/version
. It should return a minimal information you setup duringyarn init
.
Prerequisites:
- aws-cli installed. Run
aws --version
to check that you have it installed. - An aws-cli profile configured. If you don't, run
aws configure
to setup one. - git cli installed. (should be, unless you got this repo via a usb stick)
- Other things that I might have forgotten to list here.
Start Scaffolding:
Simply run following command:
yarn scaffold --profile <your_aws_cli_profile> --region <your_aws_region>
If anything went wrong during the scaffolding, the script should automatically rollback itself before terminating. Please to not stop the script halfway less you know exactly how to clean up its mess.
Also, you are encourage to read the scaffolding log to figure out what is going on.