This is a TypeScript project that provides a foundation for building RESTful web services using NodeJS and the Express framework. It builds upon RESTful API Node Server Boilerplate while keeping support for the same features and more. You can refer there for most of the core feature documentation.
- Node version 22 or later
- Docker for local external app dependencies/tools (Postgres, PGAdmin, Grafana)
- Git Bash (if on windows) for running shell scripts
- Run
npx @idvidrine/create-express-app yourAppNameornpm init @idvidrine/express-app yourAppNameto initialize a new project. cd yourAppNameandnpm run devto start the app
This project uses TypeScript instead of JavaScript for its powerful tooling and type safety, reducing bugs and improving developer experience.
SQL database instead of NoSQL for structured data using Prisma ORM. It is also used as a store for the rate limiter.
This application is meant to run inside containers locally, on-premises or in the cloud. It doesn't store any state in memory.
This project provides full application observability. It uses OpenTelemetry to collect/export logs, metrics and traces and send them to a collector running on the same network.
CI/CD is implemented using Github Actions. It has the following workflows:
- lint.yaml: check for code quality
- test.yaml: run unit/integration tests and upload coverage to codecov
- release-please.yaml: create a release PR and generate github release
- publish-docker.yaml: publish image to docker hub
- publish-npm.yaml: publish package to npm
In addition to using the latest packages like Express 5, there were a number of different package choices made based on current community support and usefulness in this project:
- Zod for object schemas / validation
- Vitest for unit/integration testing
- Scalar for API documentation
- pnpm package manager
Docker Compose is used for local application infrastructure and tools. It provides the following for a strong local development experience:
- PostgreSQL: main application database
- pgAdmin: database management tool
- Grafana: test visualizations, monitoring, alerts, etc.
- Grafana Loki: logs backend
- Grafana Tempo: tracing backend
- Grafana Mimir: metrics backend
- Grafana Alloy - the OTel collector