This project has been generated using the aws-nodejs-typescript template from the Serverless framework.
- Run
npm ito install the project dependencies - Run
npx sls deployto deploy this stack to AWS
I have found the testing locally (e.g. serverless invoke local) sometimes gets weird results.
Best to use postman or any other curl tool
The origin is configure via the parameters page in the web console. There is a different value for
each stage, dev and PROD. To use locally, override with CLI: --param CORS_ORIGINS=http://localhost:4200
Since Table name is constant in Production, but may vary during development, it is configured as a parameter with default value. The dev stage has a parameter configured in the web console, but PROD does not. This Means that each time sls deploy --stage dev is called, parameter value will be dynamic, and when sls deploy --stage PROD is called, it will always be constant.
Any tsconfig.json can be used, but if you do, set the environment variable TS_NODE_CONFIG for building the application, eg TS_NODE_CONFIG=./tsconfig.app.json npx serverless webpack