Skip to content

drubetti/TypeScript-Babel-Express-Starter

Repository files navigation

TypeScript-Babel-Express-Starter

Requirements

  • Docker
  • Node.js

Setup

npm i

Static Type Check

npm run type-check

Run Tests

npm t

Build JavaScript code

npm run build:js

Built code will be put in dist folder.

Start App (AOT compilation)

Build JavaScript code, then run:

node dist

Start App (on-the-fly compilation)

npm start

Start App in Docker (AOT compilation)

Build the Docker image:

npm run docker-build

Once the image is built, run:

npm run docker-start

The Docker image must be rebuilt on code changes!

Start App in Docker (on-the-fly compilation)

Build the Docker image:

npm run docker-build-dev

Once the image is built, run:

npm run docker-start-dev

or (for "watch" mode):

npm run docker-watch

The Docker image can be reused on code changes (the repository is mounted as a volume).