Skip to content

async-devil/fastify-ts-template

Repository files navigation

Fastify typescript template

Run docker image

Provides ready to go docker compose config

sudo docker compose build
sudo docker compose up

Local installation

yarn instal

Local start

yarn build
yarn start

Test

yarn test
yarn test:cov

Test at docker image

sudo docker compose up backend -d

sudo docker exec fastify-api yarn test:cov

sudo docker compose stop backend

Access at

http://localhost:8080/api/<method> or http://127.0.0.1:8080/api/<method>

Api routes

  • POST /sandwiches
  • GET /sandwiches/:id

Description

This is ready to use fastify template using typescript, typebox validation and auto registrable routes