/fastify-esbuild

Boilerplate to create a Fastify app with better DX

Primary LanguageTypeScript

fastify-esbuild

Opinionated boilerplate to build a Fastify app with better DX.


Articles

Features

  • Use @fastify/autoload for filesystem-based routes & plugins.
  • Use esbuild-kit/tsx to reduce feedback loop during devlopment.
  • Use esbuild to bundle production code.
  • Use json-schema-to-ts to validate & type your route
  • Auto-generated Swagger UI: http://localhost:3000/documentation (production ready)

How to start?

# Install dependencies
pnpm i

# Start development
pnpm dev

# Build production code
pnpm build

# Run production code
pnpm start

TODO

  • Add docker or docker-compose for deployment
  • Add vitest & msw
  • Add dotnev for different stages
  • Add mongodb examples
  • Add envoy as a sidecar proxy