gen-express-cli

2.0.3 • Public • Published

GEN-EXPRESS-CLI

logo
GitHub License NPM Version node-current GitHub last commit NPM Downloads GitHub Repo stars

✨ Features

  • 📦 Easy to use
  • 📦 TypeScript Support
  • 📦 ESM Support
  • 📦 Prettier & ESLint Support
  • 📦 Jest Support (Unit Test)
  • 📦 Swagger Support
  • 📦 Path Alias

📂 Quick Start

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
npm run swagger # for build swagger

📖 Usage

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")
  -a, --api-doc                     use swagger for API documentation (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

📂 Folder Structure

├─ src
│  ├─ index.ts
│  ├─ __tests__
│  │  └─ user.spec.ts
│  ├─ controllers
│  │  └─ user.ts
│  ├─ models
│  │  └─ user.ts
│  └─ routes
│     ├─ index.ts
│     └─ user.ts
├─ .env
├─ .env.development
├─ .eslintrc.json
├─ .gitignore
├─ .prettierrc.json
├─ apidoc.json
├─ jest.config.ts
├─ package-lock.json
├─ package.json
├─ process.env.d.ts
├─ README.md
├─ swagger.ts
└─ tsconfig.json

📚 License

This project is licensed under the terms of the MIT license.

🤝 Contributing

Contributions, issues and feature requests are welcome! Feel free to give your feedback and give me a star if you like this project.

Package Sidebar

Install

npm i gen-express-cli

Weekly Downloads

264

Version

2.0.3

License

MIT

Unpacked Size

53.8 kB

Total Files

72

Last publish

Collaborators

  • rulerchen