mongoose

Setup Eslint Prettier in a TypeScript project with mongoose ODM

Setup Eslint Prettier in a TypeScript project with mongoose ODM

#Step 1 : Initialize the project mkdir my-project cd my-project npm init -y Enter fullscreen mode Exit fullscreen mode #Step 2 : Install necessary packages npm install express mongoose cors dotenv --save npm install typescript @types/node @types/express --save-dev npm install -D nodemon ts-node-dev eslint @eslint/js @typescript-eslint/parser @typescript-eslint/eslint-plugin prettier Enter fullscreen mode Exit fullscreen mode #Step 3 : Create a folder structure `my-project │ .env │ .gitignore │ eslint.config.mjs │ tsconfig.json ├───dist ├───src │ │ app.ts │ │ server.ts ├───app | | │ └───config │ index.ts` Enter fullscreen mode Exit fullscreen mode #Step 4 : Initialize typescript tsc --init Enter fullscreen…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.