generator-rest-express-typescript

1.3.1 • Public • Published

generator-rest-express-typescript NPM version Build Status Coverage percentage

Create a REST API in typescript with Express and Typeorm

Installation

First, install Yeoman and generator-rest-express-typescript using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-rest-express-typescript

Then generate your new project:

yo rest-express-typescript myapp

Very coolos features

  • generate openapi documention with a simple command, and read it via swagger-ui
  • Logs with morgan

Getting Started

  • Run npm start to preview and watch for changes
  • Run npm run migration:run to run migration scripts
  • Run npm run debug to lauchn debug mode
  • Run npm run build to create the production version
  • Run npm run test to lauch jest test
  • Run npm run swagger:generateto generate the swagger file from code

Docker

You can use docker during your developement process. First, build the docker image:

docker build -t myapp .

And run it:

docker run -p 3000:3000 -v $(pwd):/usr/src/app myapp

TODO 🚧

  • Add subcommand to create a new endpoint

Contribute

See the contributing docs.

License

MIT © Clément Lafont

Package Sidebar

Install

npm i generator-rest-express-typescript

Weekly Downloads

1

Version

1.3.1

License

MIT

Unpacked Size

53 kB

Total Files

36

Last publish

Collaborators

  • johnrazeur