Boilerplate for using Expressjs + Typescript + ESM module
Architecture inspired by: Nodejs Best Practice Github Repo
Init a server, try to handle unhandledRejection and uncaughtException. Gracefully shutdown and disconnect all connection to databases.
Use pnpm for better performance and disk saving
Setup nodemon + ts-node to run with development mode: npm run dev
Config ts-node + tsconfig to work with ESM module
Use Airbnb base + Prettier
Use mongoose to conenct with retry handling
Use prisma as an alternative
For validate request
Compression will be done on Nginx/KongAPI instead of in service