Skip to content

Latest commit

 

History

History
91 lines (62 loc) · 2.31 KB

README.md

File metadata and controls

91 lines (62 loc) · 2.31 KB

CircleCI CodeFactor

nodejs-lambda-starterkit

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

Running the example

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

Generate API spec under /docs

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!

git-mob for adding your pair(s) to commits

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

Todos

lambda

  • dockerize?