Note
GEN-EXPRESS-CLI
now supports express 5
! You can use the latest version of express
with this CLI tool.
gen-express-cli
is a alternative to express-generator
with more features and easy to use. It is a command line tool that helps you to generate a new express project with TypeScript, ESM, Docker, Prettier, ESLint, Jest, and Path Alias.
- 📦 ES Module
- 📦 TypeScript
- 📦 Prettier & ESLint
- 📦 Jest
- 📦 Path Alias
- 📦 Dockerfile
npx gen-express-cli@latest <project-name>
cd <project-name>
npm run dev # for development
npm run start # for production
npm run build # for typescript build
npm run lint # for eslint
npm run format # for prettier
npm run test # for unit test
docker build -t <image-name> .
npx gen-express-cli --help
Usage: gen-express-cli [project-name]
Options:
-v, --version output the current version
-t, --template <template-name> choose express template (choices: "javascript", "typescript")
-l, --linter choose linter (default: false)
-u, --unit-test <unit-test-name> choose unit test (choices: "jest", "none")
-d, --docker use docker for containerization (default: false)
-al, --alias use alias for import (default: false)
-m --manager <package-manager> choose package manager (choices: "npm", "yarn")
-h, --help display help for command
├─ src
│ ├─ index.ts
│ ├─ __tests__
│ │ └─ user.spec.ts
│ ├─ controllers
│ │ └─ user.ts
│ ├─ models
│ │ └─ user.ts
│ └─ routes
│ ├─ index.ts
│ └─ user.ts
├─ .dockerignore
├─ .env
├─ .env.development
├─ .eslintrc.json
├─ .gitignore
├─ .prettierrc.json
├─ Dockerfile
├─ jest.config.ts
├─ package-lock.json
├─ package.json
├─ process.env.d.ts
├─ README.md
└─ tsconfig.json
Please see dependency.js for more details.
This project is licensed under the terms of the MIT license.
Contributions, issues and feature requests are welcome! Feel free to give your feedback and give me a star if you like this project.