@nyota/create-express-app
v1.0.3
Published
CLI tool to scaffold modern Express.js applications with TypeScript, ORMs, and best practices
Downloads
634
Maintainers
Readme
@nyota/create-express-app
Enterprise-ready CLI to scaffold modern Express 5 applications with TypeScript, tsx, modern ORMs, and battle-tested defaults.
Features
- Express 5: Native async error handling without boilerplate wrappers.
- Modern Runtime: Powered by
tsx(Fast esbuild-based watcher replacing legacyts-node-dev). - Modern Interactive UX: Styled using
@clack/promptsvisual steppers. - Built-in Security & Validation: Helmet HTTP headers, CORS, and Zod runtime schema validation.
- Database & ORM Support:
- Drizzle ORM (Modern
drizzle-kitstandard dialect) - Prisma 6
- TypeORM
- Mongoose (MongoDB)
- Raw PostgreSQL (
pg)
- Drizzle ORM (Modern
- Testing: Choice of Vitest or Jest pre-configured with Supertest.
- DevOps: Production-ready Dockerfile & Docker Compose services.
- Transactional Safety: Safe file system rollback engine preventing partial directory corruption if setup is interrupted.
Quick Start
Interactive Mode (Recommended)
npx @nyota/create-express-app@latestQuick Start with Defaults
Scaffold a TypeScript Express 5 app with recommended security headers and CORS in seconds:
npx @nyota/create-express-app@latest my-api --yesCLI Options & Flags
npx @nyota/create-express-app [project-name] [options]
Options:
-y, --yes Skip prompts and use standard defaults
-t, --template <template> Template choice: typescript or javascript
-p, --pm <packageManager> Package manager: npm, pnpm, yarn, bun
-o, --orm <orm> Database ORM: none, prisma, drizzle, typeorm, mongoose, pg
--cors / --no-cors Enable / disable CORS support
--helmet / --no-helmet Enable / disable Helmet security headers
--validation Include Zod request validation
--logger Include Winston logger
--docker Include Docker and docker-compose setup
--tests <framework> Testing framework: vitest, jest, none
--git / --no-git Initialize Git repositoryGenerated Project Structure (TypeScript)
my-express-app/
├── src/
│ ├── middleware/
│ │ └── validation.middleware.ts # (if Zod enabled)
│ ├── routes/
│ │ └── v1/
│ │ └── index.ts # API v1 routes
│ ├── utils/
│ │ └── logger.ts # (if Winston enabled)
│ ├── db/ # (if Drizzle enabled)
│ │ └── schema.ts
│ └── index.ts # Express 5 entry point
├── tests/ # (if Vitest / Jest enabled)
│ └── app.test.ts
├── drizzle.config.ts # (if Drizzle enabled)
├── prisma/ # (if Prisma enabled)
│ └── schema.prisma
├── .env
├── .env.example
├── .gitignore
├── tsconfig.json
├── Dockerfile # (if Docker enabled)
├── docker-compose.yml # (if Docker enabled)
├── package.json
└── README.mdScaffolding Script Commands
Inside your generated project directory:
| Script Command | Description |
| :----------------------- | :-------------------------------------------------------- |
| npm run dev | Starts development server with hot-reload via tsx watch |
| npm run build | Builds TypeScript code to dist/ |
| npm start | Runs production build from dist/index.js |
| npm test | Runs Vitest or Jest test suite |
| npm run db:push | Pushes Drizzle schema directly to database |
| npm run prisma:migrate | Runs Prisma database migrations |
License
MIT © Nyota Imara Technologies
