A serverless
boilerplate project, it is bundled together including:
express
typescript
serverless.yml
template, for AWS Lambda provider.- Packaged with commonly-used packages, such as
moment
,axios
and a few more - remove them inpackage.json
if not needed.
This boilerplate is set to
yarn
ONLY. See Customization section, for more information.
- Login into
serverless
account, withserverless login
command - follow the prompts. - Next, run
yarn
to install project dependencies. - Deploy with
npm run deploy
, to AWS Lambda for the first time. - Done!
Before you begin development, prepare your serverless
boilerplate, with your configurations and settings set for your needs. A checklist is prepared for you below:
- Configure
serverless.yml
file, to suit AWS account details and Lambda configurations. - To use
npm
, make the follwing changes:- Customize your
.gitignore
and "lock" files (package-lock.json
oryarn.lock
). - The boilerplate default is set to
yarn
usage - seeserverless.yml
file, underserverless-bundle
. - See
package.json
file, underengines
property, for "dummynpm
definition" - this is how I preventnpm
usage in this project.
- Customize your
- Modify
package.json
file, its properties and the list of packages if needed. - There is an example file called
/controllers/demo.ts
, modify / change this section and its contents. Or, you may modify the rest of thesrc
folder and its contents.
See https://www.serverless.com/framework/docs/providers/aws/guide/workflow/.