Skip to content

ymhmd/fastify-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastify-template

This is template for Fastify with TypeScript with the following features:

  • Handle CORS with @fastify/cors
  • Handle api versioning
  • Configure swagger (i.e. @fastify/swagger and @fastify/swagger-ui)
  • Configure pino-pretty for cool log lines
  • Sample prehandler
  • Sample endpoint

How to run?

  1. Install dependencies npm i
  2. Build the app npm run build
  3. Run server npm run dev
  4. Open swagger in the browser http://localhost:8080/api/v1 💥
  5. Start add your endpoints 🚀
  6. Have fun 🎉

Demo

fastify-template.mov