Skip to content

A simple template to start a new Fastify project with TypeScript

Notifications You must be signed in to change notification settings

DouglasdeMoura/fastify-ts-starter

Repository files navigation

Fastify TypeScript starter

This is a Fastify starter project for your new projects. Out-of-the-box, it includes:

  • TypeScript (with tsx for development);
  • OpenAPI support with Scalar theme;
  • File based routing and auto-loading plugins provided by fastify-autoload;
  • GitHub Actions for auto-merging Dependabot PRs, running tests, building the project and validate the Dockerfile;
  • VS Code settings for debugging and formatting;
  • Vitest for testing;
  • Biome for code formatting and linting;
  • Commitlint for commit message linting;
  • Lefthook for git hooks;
  • Wireit to make npm/pnpm/yarn scripts smarter and more efficient;
  • Docker for containerization;
  • Docker Compose for running the app in a container;
  • Release It! to automate versioning and package publishing-related tasks (by default, the versioning is done following CalVer format).

Getting Started

Use this template to start your Fastify project.

npx degit DouglasdeMoura/fastify-ts-starter my-fastify-app
cd my-fastify-app
npm install

Available Scripts

In the project directory, you can run:

npm run dev

To start the app in dev mode.
Open http://localhost:3000 to view it in the browser.

npm start

For production mode

npm run test

Run the test cases.

Git Hooks

This project uses LeftHook to manage git hooks.

After cloning the project, run the following command to install the git hooks:

npx lefthook install

Learn More

To learn Fastify, check out the Fastify documentation.

About

A simple template to start a new Fastify project with TypeScript

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •