node app is working on localhost properly but not on heroku especially '/blog' route
node app is working on localhost properly but not on heroku especially '/blog' route error on heroku: 2022-08-19T17:15:19.022602+00:00 app[web.1]: /app/index.js:34 2022-08-19T17:15:19.022624+00:00 app[web.1]: const db1=client.db('blogData') 2022-08-19T17:15:19.022625+00:00 app[web.1]: ^ 2022-08-19T17:15:19.022626+00:00 app[web.1]: 2022-08-19T17:15:19.022626+00:00 app[web.1]: TypeError: Cannot read properties of undefined (reading 'db') 2022-08-19T17:15:19.022626+00:00 app[web.1]: at /app/index.js:34:26 2022-08-19T17:15:19.022627+00:00 app[web.1]: at Function.connect (/app/node_modules/mongodb/lib/mongo_client.js:231:24) 2022-08-19T17:15:19.022627+00:00 app[web.1]: at /app/index.js:32:17 2022-08-19T17:15:19.022629+00:00 app[web.1]: at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5) 2022-08-19T17:15:19.022629+00:00 app[web.1]: at next (/app/node_modules/express/lib/router/route.js:144:13) 2022-08-19T17:15:19.022630+00:00 app[web.1]: at Route.dispatch (/app/node_modules/express/lib/router/route.js:114:3) 2022-08-19T17:15:19.022630+00:00 app[web.1]: at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5) 2022-08-19T17:15:19.022630+00:00 app[web.1]: at /app/node_modules/express/lib/router/index.js:284:15 2022-08-19T17:15:19.022631+00:00 app[web.1]: at Function.process_params (/app/node_modules/express/lib/router/index.js:346:12) 2022-08-19T17:15:19.022631+00:00 app[web.1]: at next (/app/node_modules/express/lib/router/index.js:280:10) 2022-08-19T17:15:19.027159+00:00 app[web.1]: [31m[nodemon] app crashed - waiting for file changes before starting...[39m 2022-08-19T17:21:16.424321+00:00 heroku[web.1]: State changed from up to down 2022-08-19T17:21:16.427649+00:00 heroku[web.1]: State changed from down to starting 2022-08-19T17:21:18.716879+00:00 heroku[web.1]: Starting process with command `npm start` 2022-08-19T17:21:18.957020+00:00 heroku[web.1]: St