Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 836 Bytes

README.md

File metadata and controls

25 lines (19 loc) · 836 Bytes

Expressjs + Typescript + ESM

Boilerplate for using Expressjs + Typescript + ESM module

Architecture inspired by: Nodejs Best Practice Github Repo

Express

Init a server, try to handle unhandledRejection and uncaughtException. Gracefully shutdown and disconnect all connection to databases.

Package manager

Use pnpm for better performance and disk saving

Typescript

Setup nodemon + ts-node to run with development mode: npm run dev
Config ts-node + tsconfig to work with ESM module

Eslint

Use Airbnb base + Prettier

Mongodb

Use mongoose to conenct with retry handling

Use prisma as an alternative

Joi

For validate request

Note

Compression will be done on Nginx/KongAPI instead of in service