Skip to main content
v1.8.1 — Now on npm

xpress-generator

Scaffold a production-ready Express.js backend in one command. Choose your database, enable TypeScript, and get auth, testing and linting — all configured automatically.

$npx xpress-generator create MyApp
4Databases
TSTypeScript
JWTAuth Included
0Config needed
🗄️

4 Databases

Support for MongoDB, MySQL, PostgreSQL, and SQL Server. Each with its own model, service, and config — ready to go.

🔷

TypeScript Optional

Full TypeScript support with typed templates, tsconfig.json,ts-jest, and @types/* for all dependencies. One question at setup — done.

🔐

Auth Included

JWT access tokens (15m) + refresh tokens (7d, httpOnly cookie). Role-based access control with requireRole() and rate limiting on auth routes out of the box.

🛡️

Centralized Error Handling

AppError class, global errorHandler middleware, and catchAsync wrapper. Handles Mongoose, Sequelize, and mssql errors automatically.

Testing from Day One

Jest + supertest pre-configured with 70% coverage threshold, an example test, ESLint, Husky pre-commit hooks, and lint-staged — all wired up automatically.

Code Generators

After project creation, run xpress generate:model User to scaffold a full CRUD with controller, service, validator, and routes in seconds.

Up and running in under 2 minutes

01

Create your project

npx xpress-generator create MyApp
02

Configure your .env

JWT_SECRET=your-secret
DB_URI=mongodb://localhost/myapp
03

Start developing

cd MyApp && npm run dev