@idvidrine/create-express-app
v1.1.5
Published
Cloud native, production ready starter application for building RESTful APIs using Express and PostgreSQL
Maintainers
Readme
About
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.
Prerequisites
- Node version 22 or later
- Docker for local external app dependencies/tools (Postgres, PGAdmin, Grafana)
- Git Bash (if on windows) for running shell scripts
Quick Start
- Run
npx @idvidrine/create-express-app yourAppNameornpm init @idvidrine/express-app yourAppNameto initialize a new project. cd yourAppNameandnpm run devto start the app
What's Different
TypeScript
This project uses TypeScript instead of JavaScript for its powerful tooling and type safety, reducing bugs and improving developer experience.
PostgreSQL
SQL database instead of NoSQL for structured data using Prisma ORM. It is also used as a store for the rate limiter.
Cloud Native
This application is meant to run inside containers locally, on-premises or in the cloud. It doesn't store any state in memory.
Observability
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.
Github Actions
CI/CD is implemented using Github Actions with support for running tests, coverage, and deployment to docker hub.
Packages
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
Local Development
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
