Мое приложение работает нормально в моем рабочем пространстве Cloud9, но не в Heroku.Я подключен к базе данных mLab.Я также пытался переключить базу данных, но она не работает.
выдает эту ошибку
nandkishor8878:~/workspace/YelpCamp/v10 (master) $ heroku run node app.js
Running node app.js on ⬢ murmuring-brushlands-13115... up, run.5176 (Free)
Warning: connect.session() MemoryStore is not
designed for a production environment, as it will leak
memory, and will not scale past a single process.
The YelpCamp server has started
(node:4) UnhandledPromiseRejectionWarning: Error: URL malformed, cannot be parsed
at module.exports (/app/node_modules/mongodb/lib/url_parser.js:17:21)
at connect (/app/node_modules/mongodb/lib/mongo_client.js:880:3)
at connectOp (/app/node_modules/mongodb/lib/mongo_client.js:269:3)
at executeOperation (/app/node_modules/mongodb/lib/utils.js:420:24)
at MongoClient.connect (/app/node_modules/mongodb/lib/mongo_client.js:260:10)
at Promise (/app/node_modules/mongoose/lib/connection.js:427:12)
at new Promise (<anonymous>)
at NativeConnection.Connection.openUri (/app/node_modules/mongoose/lib/connection.js:424:19)
at Mongoose.connect (/app/node_modules/mongoose/lib/index.js:208:15)
at Object.<anonymous> (/app/app.js:19:10)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
(node:4) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:4) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.