A starter kit for serverside node application using fastify and lambda.
Included in the starter kit:
- typescript
- eslint
- prettier
- jest
- precommit with husky
App components in the starter kit:
- logger
- web server (
fastify
) with@fastify/autoload
for routes organization
Docs components in the starter kit:
- @fastify/swagger to generate OpenAPI spec based on defined route schema
Prepare your environment:
./scripts/devsetup
# local development running as node
npm start
OR
# local development running as a lambda
npm run start:asLambda
Then see a request go through:
curl localhost:3000/ping
Run the following command to generate the spec as json:
mkdir -p docs
npm run build
npm run generate:openapi
pbcopy < docs/spec.json
Head on over to the swagger editor and paste it in!
If you pair (or mob) frequently, git-mob makes it easy to append co-authors to your commit messages.
This repository comes with a sample .git-coauthors
file checked in, and the devsetup.sh
script copies over the file to where it needs to be.
If you get a new teammate, don't forget to check them in and remind the team to update their co-authors file after they pull.
cp .git-coauthors ~/.git-coauthors
- https://www.fastify.io/docs/latest/Guides/Ecosystem/
- authetication
- structured example (api test)
- structured example (contract tests)
- improve logging
- metrics / telemetry
- graceful shutdown
- db connection
- publish as a package | create a GH template
- devbox
- dockerize?