I deployed my MERN app on heroku it is working fine. However, the deployed app uses my local server. when I stop my local server, the deployed app stops working. What am I doing wrongly?
Here is my package.json file
{
"name": "careplan",
"version": "1.0.0",
"description": "careApp",
"main": "app.js",
"scripts": {
"start": "node server.js",
"start:prod": "SET NODE_ENV=production&& server.js",
"debug": "ndb server.js",
"dev":"nodemon server.js",
"heroku-postbuild": "cd client && npm install --only=dev && npm install && npm run build"
},
"engines": {
"node": "16.13.1"
},
"author": "Oladimeji Shopeyin",
"license": "ISC",
"dependencies": {
"bcrypt": "^5.0.1",
"cors": "^2.8.5",
"dotenv": "^14.2.0",
"express": "^4.17.2",
"jsonwebtoken": "^8.5.1",
"mongoose": "^5.13.14",
"morgan": "^1.10.0",
"validator": "^13.7.0"
},
"devDependencies": {
"eslint": "^8.7.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"nodemon": "^2.0.19",
"prettier": "^2.5.1"
}
}