Skip to content

lucasgauthier/fastify-starter

Repository files navigation

Fastify starter

About

This is the scaffolding of a Fastify server application

Tech stack

Fastify 5 + TypeScript 5 + Vitest 4 + ESLint 9 (antfu config)

Setup

Copy the template

You can clone this repository and use it as a starting point for your Fastify server application.

Alternatively, you can use degit to create a new project based on this template without the git history.

pnpx degit lucasgauthier/fastify-starter my-project

Install the dependencies

pnpm install --frozen-lockfile

Env vars

Loaded from .env file with schema validation (with TypeBox)

Scripts

There are a number of handy commands you can run:

Command Action
pnpm dev Run the server in development mode, automatically restarts on file change
pnpm build Build the server for production
pnpm start Run the server in production mode
pnpm test Run tests
pnpm lint Run ESLint lint check
pnpm lint:fix Run ESLint lint check and fix the issues

Misc

Supply chain security

To reduce the risk of installing compromised packages, this project enforces a 7-day delay before installing newly published package versions. The policy is configured in pnpm-workspace.yaml with:

minimumReleaseAge: 10080 # minutes (= 7 days)

About

Fastify server starter

Resources

License

Stars

Watchers

Forks

Contributors