Typescript express.js boilerplate

Build Status

About

Repo includes boilerplate with basic structure required to build REST API servers.

Commands

Start

For live reloading server when you write code use command for starting the server in watch mode. The server will be restarted when files in src directory changes.

yarn start

Build

To compile app in ES5 compotable JS-code use command:

yarn compile

After compile in repo directory will be created dist folder containing JS-code.

Start compiled app

To start compiled app just use command:

yarn start:production

Tests

All app tests are located in tests folder.

Following command run testing tool:

yarn test

DB migrations

For create new migration use following command:

npx knex migrate:make MIGRATION_NAME --knexfile src/knexfile.js

To apply migrations use this command:

npx knex migrate:latest --knexfile src/knexfile.js