express-react-generator-typescript

Express application generator, with TypeScript, Jest, ESLint and optionally React support, which’s inspired by Sean Maxwell’s express-generator-typescript.

Installation

$ npm install -g express-react-generator-typescript

Quick Start

Create the app:

$ ergt my-app

// Or add TypeScript support

$ ergt -t my-app

Start your app at http://localhost:5555/:

$ cd my-app && npm i && npm run dev

Command Line Options

This generator can also be further configured with the following command line flags.

    -V  --version         output the current version
    -t  --typescript      add TypeScript support
    -f  --force           force on non-empty directory

Why these packages

  1. express
    1. ts-node: Running .ts files directly
  2. typescript
    1. eslint
      1. TSLint will be replaced by ESLint`
      2. Formatting codes with prettier together

        Didn’t use prettier-eslint as it doesn’t work well with ESLint+Typescript

    2. prettier: The most popular code formatter
    3. reflect-metadata: Supporting Decorator
  3. jest
    1. ts-jest: Running .test.ts files directly
    2. supertest: Testing API endpoints
  4. nodemon Watching files changes then live reloading
  5. husky Automatically test and lint before Git commit/push

Credit