@devmoods/express-extras
v0.39.1
Published
Kubernetes-ready utilities for rapid Node.js application development
Downloads
804
Readme
@devmoods/express-extras
Kubernetes-ready utilities for rapid Node.js application development
Extremely opinionated set of utilities for cranking out production-ready Node.js apps in a timely manner. We assume you are using PostgreSQL as the main database, Redis for data you don't want in Postgres and Faktory for background jobs.
- Only works with ECMAScript Modules (ESM)
- Thin layer on top of Express with better support for
async
/await
- PostgreSQL with transactions and migrations
- Redis
- Slack (and Discord) client for sending operational notifications
- CLI commands inspired by Django's management commands
- Delayed jobs with Faktory
- Validation of HTTP requests using JSON Schemas
- Logging helpers to write well-formatted contextual JSON logs to
stdout
- Request local context using AsyncLocalStorage (e.g. request ids)
- RFC 7807 Problem Details for HTTP APIs by default
- Works best with the pnpm package manager
- Uses Sentry for external error monitoring
- Inspired by The Twelve-Factor App
- Graceful shutdown
- Read configuration from
.env
files
Goals
- Time-to-market
Non-goals
- Encourage deviating from the chosen path
Example
See the example/ folder for a complete example.
Configure
Put environment variables in .env
at the application will automatically read those on startup. For test configuration in unit and integrations tests, use .env.test
.