Here's a boilerplate project for rapidly constructing a web server using Node.js, Express, Mongoose, and TypeScript. It includes file upload functionality using multer. Additionally, it integrates several syntax validation tools such as commitlint, eslint, lint-staged, prettier, and husky.
Prepare:
"engines": {
"node": "20.x",
"npm": "10.x"
}
Clone the repo:
git clone [email protected]:nc-minh/nodejs-express-boilerplate.git
Install the dependencies:
npm i
Set the environment variables:
cp .env.example .env
Start on dev:
npm run dev
Start on prod:
npm run build && npm run start