JSPM

  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q45736F
  • License MIT

A simple express cli to generate express app simply by running a command, similar to express-generator

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gen-express-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    GEN-EXPRESS-CLI

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

    📘 Introduction

    [!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.

    ✨ Features

    • 📦 ES Module
    • 📦 TypeScript
    • 📦 Prettier & ESLint
    • 📦 Jest
    • 📦 Path Alias
    • 📦 Dockerfile

    📂 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
    
    docker build -t <image-name> .

    📖 Usage

    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")
      -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

    📂 Folder Structure

    ├─ 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

    📦 Dependencies

    Please see dependency.js for more details.

    📚 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.