Create a new server:
pnpx degit yonathan06/fastify-typescript-starter my-serveror npx.
See degit docs for detailed explaination
- TypeScript (using esbuild for fast compilation, and tsx for development)
- Env vars
- Tests (using Vitest)
- Fastify
- CI with github actions
- Docker image
- Linting
BYODB - Bring your own database - no database connection included
- Install the dependencies.
pnpm installor npm/yarn
- Start the server in development mode.
pnpm devor npm/yarn
Loaded from .env file, with schema validation
There are a number of handy commands you can run to help with development.
| Command | Action |
|---|---|
pnpm run dev |
Run the server in dev mode, automatically restarts on file change |
pnpm build |
Compile TypeScript to JavaScript |
pnpm start |
Start JavaScript from 'build' directory |
pnpm test |
Run unit tests (run pnpm build before) |
pnpm lint |
Run biome check |
Run tests on push/PR to 'main' branch
Check .github/workflows/CI.yml