Configuring Node.js Connection String for Mongo Labs Database on Heroku
问题 My web app (built on Node.js and Express) works fine locally, but when I deploy it to Heroku, I'm unable to connect to my Mongo Labs database. I've changed the connection string in my 'app.js' file to properly reflect the URI of the new Heroku Mongo Labs database (fake username and password substituted below). I've also tried several stackoverlow solutions can't connect to mongolab with node.js on heroku as well as https://devcenter.heroku.com/articles/getting-started-with-nodejs#using