Skip to content

Armored Template for Fastify projects using TypeScript 🛡️

License

Notifications You must be signed in to change notification settings

flaviodelgrosso/fastify-forge

Repository files navigation

🛡️ Fastify Forge 🛡️

CI

Typescript based REST API lite boilerplate using Fastify framework.

Features

Plugins

Type Safety and Schemas

Swagger

swagger-ui

Environment

  • Environment variables with dotenv
  • Environment variables validation with joi

Linting and Formatting

  • The project uses biome to lint and format the codebase.

How to use

1. Clone this repo & install dependencies

Install Node dependencies:

pnpm install

2. Start the Fastify server

Running development server is pretty straightforward. It uses tsx, the easiest way to run Typescript in Node.js. Just run the following command in watch mode:

pnpm dev

🚀 Building

To generate a production build, the project uses tsup. Build server with command:

pnpm build

🧪 Testing

To run tests, the project uses borp that is a typescript-aware test runner for Node.js built-in testing library. It also supports c8 coverage. Borp is very usefull if you want avoid struggling with loaders and false positives uncovered code.

pnpm test

About

Armored Template for Fastify projects using TypeScript 🛡️

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published