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
- express
- ts-node: Running
.ts
files directly
- ts-node: Running
- typescript
- eslint
- TSLint will be replaced by ESLint`
- Formatting codes with prettier together
Didn’t use prettier-eslint as it doesn’t work well with ESLint+Typescript
- prettier: The most popular code formatter
- reflect-metadata: Supporting Decorator
- eslint
- jest
- ts-jest: Running
.test.ts
files directly - supertest: Testing API endpoints
- ts-jest: Running
- nodemon Watching files changes then live reloading
- husky Automatically test and lint before Git commit/push