go to
Database
section at the left side and then go toConnect
and then go toDriver
and then copy themongodb connection string
which is look like this
mongodb+srv://<username>:<password>@cluster1.r104mlb.mongodb.net/?retryWrites=true&w=majority&appName=Cluster1
and then go to the
Database Access
in left side and then create a new database user please save theusername
andpassword
and then paste it to the mongodb connection string<username>
and<password>
section
and remember one thing Dont forget to addBuilt-in-role
toRead and write to any database
DATABASE_URL
="Your mongodb connection string"
PORT
= 3000
remember one thing don't add any semicolon or any single or double quotes
npm install
run
npm run start:prod