Skip to content

matschik/fastify-typescript-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Fastify & TypeScript Starter

A simple starter template for building APIs with Fastify and TypeScript using Node.js 24+.

Requirements

  • Node.js 24.0.0 or higher
  • npm

Installation

git clone https://github.com/Matschik/fastify-typescript-starter.git
cd fastify-typescript-starter
npm install

Usage

Development

Start the development server with hot reload:

npm run dev

The server will automatically restart when you change files.

Production

Start the production server:

npm run start

Other Commands

npm run typecheck  # Check for TypeScript errors
npm run format     # Format code with Prettier

Project Structure

src/
  β”œβ”€β”€ index.ts              # Entry point
  β”œβ”€β”€ app.ts                # Fastify app setup
  β”œβ”€β”€ router.ts             # Route registration
  └── controller/           # Route handlers
      β”œβ”€β”€ indexController.ts
      └── userController.ts

Getting Started

  1. Start the dev server: npm run dev
  2. Visit http://localhost:3006 in your browser
  3. Check http://localhost:3006/api/v1/user for the API endpoint
  4. Edit files in src/ to see changes automatically

Features

  • βœ… Fastify web framework
  • βœ… TypeScript support (no build step needed)
  • βœ… Hot reload in development
  • βœ… Type checking with npm run typecheck

License

MIT

About

πŸš€ Fastify & TypeScript starter repository

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7