Example to show how to run hug in AWS lambda using serverless.
Steps to install and test:
-
nvm install
ornvm use
(if your default node is incompatible) -
npm install
-
npm run sls-serve
This starts a local test server. You can test against it using:
curl -H 'X-Who: Steve' http://localhost:5000/hello
To deploy to AWS use npm run sls-deploy
.
That requires AWS credentials configured.
For deployed URL, see the output of sls-deploy.