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 https://pottstownrumble.org/api/users/register 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 127.0.0.1:27017/mydbname but that didn’t work either.
PLEASE HELP!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.