This is a base project for back-end/microservice projects.
In order to setup the application you need to run:
npm install
If you want to run the TypeScript build process, run:
npm run build
Note: The build command is run every time you start your application, so no need to run it manually.
If you just start your app, run:
npm run start
If you want to run a debug/watch mode, where your app reloads when changes to the code are made, run:
npm run start:watch
In order to run the linting on the whole project, run:
npm run lint
This will run all the tslint rules found in the stricter-tslint-config.
Testing is done via the Jest framework. In order to run all the test with code coverage, run:
npm run test
If you want to continuously run the tests and watch for changes, run:
npm run test:watch
The current application will log everything on the console and in the folder /logs
. The logs are rolling and are based on a date/hour combination. Each hour a new log file is created and the old one is compressed and stored in the same folder.
Swagger is used for the documentation of the Rest APIs. You need to write yaml files using the OpenAPI 3.0 standard in order to produce the end product. For now yaml files are only collected from the /models
and /controllers
folder.
In order to access the Swagger UI, navigate to {host}:{port}/api-docs
.