- VSCode debugger setup at
.vscode/launch.json
with serverless-offline, just press f5 to start a local server and inspect break points - Apollo-Server v2 setup for an AWS Lambda
- Caching GraphQL Responses in memory or redis
- MongoDB/Mongoose integration & Caching connections outside of lambda handler
- Serverless setup for different environments & deployment targets
- serverless-warmup plugin integration to reduce cold starts possibility and keep the lambdas warm
- Semantic-versioning, changelog generation and automated releases thanks to semantic-release
- Linting with StandardJS
- Gzip compression
- Environment variables per stage can be defined in an
env.yml
file - AWS X-Ray integration for traces
- GraphQL Playground integration w/ traces
- Apollo Engine/Graph Manager integration for monitoring
- Serverless Dashboard monitoring
- Setup your aws credentials and aws profile using
aws configure --profile <aws profile>
npm install
- use
yarn start
to run in offline mode` yarn deploy:dev
to deploy dev environmentyarn deploy:live
to deploy to live
- Environment variables can be setup in
env.yml
file - add your
ENGINE_API_KEY
to a .env file
- Install serverless cli using
npm i -g serverless
- Install and setup your aws cli with an aws profile using
aws config --profile=<aws profile>
- use
yarn deploy:dev
oryarn deploy:live
This repo uses semantic-release, commitizen, commitlint, husky and conventional commits in order to automate the release proccess
- The user needs to have a
GH_TOKEN
environment variable set with a valid git token that has push access to the repository which can be generated following these steps - the token can be added into a
~/.bash_profile
to avoid manually setting it before running the command. - The script should be run from the release branch only (default: master) otherwise it will fail. To change the release branch you can edit the "release" section in the
package.json
file to temporarily set the release branch as follows
"release": {
...
"branch": "feature/integrate-semantic-release"
...
}
yarn commit
will run commitizen cli to generate a conventional style commit messageyarn release
will do a dry-run of the release without pushing or changing any filesyarn release --no-ci
will do a real release. We could potentially use this to automate releases when new commits/PRs land in the master branch Details
- Bump the version in
package.json
according to semantic versioning (semver) based on the changes/commit messages (fix/perf = patch, feat = minor, breaking = major) - Create a git tag
- Generate a CHANGELOG.md with the latest changes since the last release
- Push the changes to the repository & create a git release