Skip to content

Repository files navigation

Node.js TypeScript Template

CI License: MIT

A strict template for building Node.js applications with TypeScript, ESM, pnpm, Biome and the built-in Node.js test runner.

Features

  • 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

Requirements

Tool Version
Node.js >=24 <25
pnpm 11.24.0

The Node.js range and exact pnpm version are declared in package.json.

Getting Started

git clone https://github.com/PoProstuWitold/node-ts-template.git
cd node-ts-template
pnpm install
pnpm dev

Available Scripts

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

Production Build

pnpm build
pnpm start

The compiled entry point is build/main.js.

Project Structure

.
├── .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

Continuous Integration

GitHub Actions runs the following commands for pull requests and pushes to main:

pnpm check
pnpm test
pnpm build

License

Licensed under the MIT License.

About

A strict template for building Node.js applications with TypeScript, ESM, pnpm, Biome and the built-in Node.js test runner.

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages