Express Generator
A CLI tool that scaffolds production-ready Express.js projects with TypeScript, Docker, database integration, ORM, and authentication, all pre-configured.
Quick Start
npx @excli/express
Or install globally:
npm install -g @excli/express
excli
Requirements
- Node.js 20 or higher
- npm, yarn, pnpm, or bun
- Docker (optional, only needed for database features)
Interactive Setup
The CLI walks you through these choices:
- Project name
- Language: TypeScript or JavaScript
- Project mode: Development or Production
- Dev tools: Git, Vite+, Docker, Logger
- Logger: Winston or Pino
- Database type: SQL or NoSQL
- Database: MySQL, MariaDB, SQLite, PostgreSQL, or MongoDB
- Database library category: ORM / ODM or Query Builder
- ORM / ODM or Query Builder: Drizzle, TypeORM, Sequelize, Kysely, Mongoose, or the native MongoDB driver
- Authentication (optional): Better Auth or Clerk
- Cache (optional): Redis
- Proxy: Nginx, Caddy, or Traefik
- Proxy mode: reverse proxy or load balancing
- Package manager: npm, yarn, pnpm, or bun
Running Your Project
cd my-project
npm run dev
Your server will be live at http://localhost:3000.
Features
Databases
MySQL, MariaDB, PostgreSQL, MongoDB, and SQLite are supported. Each has a pre-configured admin panel at http://localhost:6969 after you run npm run db:up:
| Database | Admin Panel |
|---|---|
| MySQL / MariaDB | phpMyAdmin |
| PostgreSQL | pgAdmin |
| MongoDB | Mongo Express |
| SQLite | None needed |
Admin panels may take a moment to initialize on first startup.
ORM / ODM
| Tool | Databases |
|---|---|
| Drizzle, TypeORM, Sequelize | PostgreSQL, MySQL, MariaDB, SQLite |
| Mongoose, native MongoDB driver | MongoDB only |
Query Builder
| Tool | Databases |
|---|---|
| Kysely | PostgreSQL, MySQL, MariaDB, SQLite |
Authentication
- Better Auth: available with Drizzle and the native MongoDB driver.
- Clerk: works independently of your chosen ORM.
Docker
Production mode generates:
Dockerfile: production-optimized buildcompose.yaml: multi-service setup.env: development environment variables.env.production: production environment variables (created in production mode)
Reverse Proxy
Nginx, Caddy, and Traefik all support reverse proxying and load balancing. Caddy and Traefik provide automatic HTTPS, while Nginx requires manual TLS configuration but gives you more control.
Commands
npm run dev # Start development server
npm run format # Format code with Vite+
npm run build # Compile TypeScript (TS projects only)
npm run db:up # Start database services (development)
npm run db:down # Stop database services (development)
npm run db:prod:up # Start database services (production)
npm run db:prod:down # Stop database services (production)
Use the equivalent command for your chosen package manager.
Troubleshooting
Port already in use?
Change the ports in your .env file.
Docker not starting?
Make sure Docker Desktop is running before npm run db:up.
Proxy not routing traffic?
Check that compose.yaml includes the proxy service and that nothing else is bound to port 80.
Contributing
Contributions are welcome. Please read the Contributing Guide before opening a pull request.
License
ISC. See the LICENSE file for details.
Author
Noman [email protected] | @pxycknomdictator