For test generate log to console with module tslog
- Change message in 3 types such as pretty(text color), json, unformat
you can change with env calledLOG_TYPE
- Export message to console or file with apply to env called
LOG_TO_FILE
and path to stored inLOG_PATH
- Change frequency write message with env called
LOGGER_DELAY
-
Install Dev dependencies.
npm ci # or use npm install
-
To compile typescript to commonJS in
build
folder.npx tsc
-
Run dev serve with
nodemon
.npm run start:dev
You can run nodejs in docker for fasttrack to demo this service.
```bash
$ docker run -it --rm -v $(pwd):/app node:15-alpine /bin/ash
$ cd /app
$ npm ci
# this line use nodemon module to auto-reload script on-flight
$ npm run start:dev
```