Skip to content

richardm/2025-hello-typescript-node

Repository files navigation

Build Security Audit Quality checks Dependabot

Scaffolding for a minimal TypeScript ESM / Node.js 20+ / Express 5 / Eslint 9 / Prettier project

Why?

  • I'm tired of scaffolding projects from scratch and want a modern and up-to-date starting point that I can clone for new projects.
  • I have not found AI to be as good at scaffolding projects as it is at generating code within an existing project.
  • It's 2025, and it's time to use ESM with the latest versions of everything.

How to use

  1. Install Node.js 20+ (I recommend using nvm)
  2. Clone this repo
  3. Add your application code to the src directory

Supported Node.js versions

I recommend using the latest LTS version of Node.js in production; however this repo runs matrix builds ensuring compatibility with the following Node.js versions (as of June 2025):

  • Node.js 20 (Maintenance)
  • Node.js 22 (LTS)
  • Node.js 24 (Current)

Changelog

  • Remove support for Node.js 18 and below due to End-of-Life (completed June 2025)
  • Remove support for Node.js 23 due to End-of-Life (completed June 2025)
  • Add support for Node.js 24 (Current) (completed June 2025)

Project Goals

  • Require Node 20+
  • Express 5
  • TypeScript 5
  • Support TypeScript ESM
  • Use eslint for consistency
  • Use Prettier for formatting
  • Provide a VSCode .devcontainer
  • Jest for unit tests
  • (Supertest?) for API tests
  • Pino for logging
  • Adopt Conventional Commits and automatically generate the changelog
  • Provide a GitHub Actions workflow for testing

Out of Scope

  • Production: This is intended to be usable in a variety of prod environments (lambda, containers, etc). As a result, Docker and/or PM2 are out of scope for now, but I would be happy to link to reference repos for how to productionize this for a variety of production environments.
  • Backwards compatibility: This may work work with older versions, but I will not be investing any effort to support those.

Notes:

  • tsx does not perform type checking. VS Code can do that for you locally, and your CI/CD pipeline can do that for you during builds.
  • Note that tsx uses esbuild under the hood
  • Express 5 was finally released in October 2024, so it may have limited community support.
  • esbuild does not support emitDecoratorMetadata in tsconfig.json

References:

About

Scaffolding a TypeScript 5 / Node.js 22 / Express.js 5 app

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •