I'm having issues connecting my MEAN stack app to mongo

I had a fully functioning app setup in Ubuntu with the MEAN stack, but when I sent it over to digitalocean, I’m having a strange connection issue. I can’t access the database, but it seems like maybe connecting to Mongo isn’t the problem so much as accessing the Node side of the application (everything in the api folder). My console error when trying to login, for example is this:

angular.js:12587 POST 400 (Bad Request)

I’m able to log into the mongo shell and use mongoimport from the terminal, so I know I can connect. I had the connection url setup as mongodb://localhost:27017/mydbname, but changed it per the recommendations on the site from localhost to but that didn’t work either.



Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!