https://github.com/janishar/nodejs-backend-architecture-typescript
https://nodejs.org/api/packages.html#determining-module-system
Files with an .mjs extension.
Files with a .js extension when the nearest parent package.json file contains a top-level "type" field with a value of "module".
.env sample:
# Environment Name
NODE_ENV=development
# Server listen to this port
PORT=3000
#Cors
CORS_URL=*
# Databse
DB_NAME=db
DB_MIN_POOL_SIZE=2
DB_MAX_POOL_SIZE=5
DB_HOST=mongo
DB_PORT=27017
https://github.com/winstonjs/winston/blob/master/examples/quick-start.js
set timer!
const profiler = logger.startTimer();
setTimeout(function () {
profiler.done({ message: 'Logging message' });
}, 1000);
npm run test