A strict template for building Node.js applications with TypeScript, ESM, pnpm, Biome and the built-in Node.js test runner.
- Node.js 24 LTS
- TypeScript with strict type checking
- Native ES modules
- Development and testing with TSX
- Formatting and linting with Biome
- Built-in Node.js test runner
- Compiled production output
- Automated verification with GitHub Actions
| Tool | Version |
|---|---|
| Node.js | >=24 <25 |
| pnpm | 11.24.0 |
The Node.js range and exact pnpm version are declared in package.json.
git clone https://github.com/PoProstuWitold/node-ts-template.git
cd node-ts-template
pnpm install
pnpm dev| Command | Description |
|---|---|
pnpm start |
Run the compiled application |
pnpm dev |
Run the application in watch mode |
pnpm clean |
Remove generated files |
pnpm typecheck |
Run TypeScript type checking |
pnpm lint |
Run the Biome linter |
pnpm lint:fix |
Fix supported lint problems |
pnpm format |
Check formatting without modifying files |
pnpm format:fix |
Format supported project files |
pnpm check |
Run Biome checks and TypeScript type checking |
pnpm check:fix |
Apply Biome fixes and run type checking |
pnpm build |
Create a clean production build |
pnpm build:watch |
Compile continuously in watch mode |
pnpm test |
Run all tests |
pnpm test:watch |
Run tests continuously in watch mode |
pnpm ci |
Run checks, tests and the production build |
pnpm build
pnpm startThe compiled entry point is build/main.js.
.
├── .github/
│ └── workflows/
│ └── ci.yml
├── __tests__/
│ └── main.test.ts
├── src/
│ ├── main.ts
│ └── types.ts
├── .editorconfig
├── .gitignore
├── biome.json
├── package.json
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
├── tsconfig.build.json
└── tsconfig.json
GitHub Actions runs the following commands for pull requests and pushes to main:
pnpm check
pnpm test
pnpm buildLicensed under the MIT License.