tauhid-hasan-dev / typescript-express-mongoose-dotenv-cors-eslint-prettier

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Steps

1. npm init -y(to initialize a package.json file)
2. npm install express (install express)
3. npm install mongoose --save (install mongoose)
4. npm install typescript --save-dev (install typescript)
5. npm install cors (install cors)
6. npm install dotenv (install dotenv)
7. tsc --init (typescript configuration file will be generated)
8. Modify the tsc config file (rootDir and outDir)
8. connect mongoose in server.ts
8. get database url from mongodb atlas with username and password
8. connect .env file with config file
8. add json parser from express
8. use cors

---- Install eslint prettier ts-node-dev ----

follow this link: https://blog.logrocket.com/linting-typescript-eslint-prettier/

About


Languages

Language:TypeScript 100.0%