I’ve been writing a web app for real estate agents, which has been going fantastic thanks to Meteor.
Now another team is stepping in to build a mobile app which will run off all the same data as the current website.
I have deployed my site with MUP, which has gone really well, but now I see that "You can’t access the MongoDB from the outside the server. " according to the MUP Github page.
I’m new to this mongo stuff, and new to server stuff in general.
Am I missing something here? I’m trying to think of another way to do this, I guess I could just spin up another server specifically for mongo (which probably would be smart anyways correct?)
Would spinning up another DO server make the most sense if there are two separate applications reading from the database?
There are ways to work around the mup mongo access limitation, but I wouldn’t recommend them (for security reasons). Instead I’d recommend signing up with a 3rd party Mongo provider (like compose.io). Not only will you be able to access your Mongo DB instances from anywhere / with any app, you’ll be taking advantage of having Mongo pro’s look after the lifeblood of your app.
Interesting, makes sense.
I will for sure keep that in mind once we put the app in full production mode.
As we are just throwing up test servers at the moment, could I just spin up a DO server with Mongo installed, and then connect to that with the MUP config file?
I just created a new droplet with Mongo installed, could I essentially just throw that connection string into MUP and begin entering data?
Thanks a lot.
Yes - just set your mup.json
MONGO_URL accordingly (see the example mup.json file in the docs). You might want to make sure you also disable
setupMongo in your mup.json as well.
Wonderful, thanks a bunch. Now I gotta conquer allowing remote access to the Mongo server. Giving me a headache already!
Hey man, one last problem. I’ve redeployed my app connecting to the remote mongo server, MUP works fine,
but now when I go to load my site www.****.com, I get routing errors.
Do you know if this would be from the db not being connected, or some other internal error with my code?
Thanks a bunch.
EDIT - Might have been a code problem, I see an error saying multiple templates named the same thing.