Sign in
Log inSign up
Please write a tutorial on how to take the MERN scaffolding to a cloud server and DB?

Please write a tutorial on how to take the MERN scaffolding to a cloud server and DB?

Jeff Papineau's photo
Jeff Papineau
·Mar 6, 2016

I have been using MEANJS.org and it's really wonderful. So many features and it's easy to work with, well documented.

For MERN, I have been disappointed, because I am simply trying to containerize it and put it in the cloud; I fail over and over.

I am a newbie but it should be really easy to do this: a) Change the port to 80 in config.js b) Change the DB to point to another remote end point c) Run with remote DB, without sudo on a Mac

If I attempt to "npm start" without sudo, and I have a remote end point for DB, npm start fails. What is a solution to this? I do not believe a remote cloud provider is going to allow me sudo..

If I attempt to change the server port to 80, even locally with sudo npm start, the app fails.

This scaffolding at this point is very brittle, and if I attempt to change the env in small ways, it fails.

Can we please have a tutorial that explains exactly what needs to change, in order to start the app without sudo (with remote DB), and change to the normal HTTP port?

EDIT: I would also like to say that I am simply attempting the following:

a) Use Mongolabs.com free DB instead of local mongodb b) Use bluemix.net free app container hosting via their blumix CLI and push my local running MERN app to the cloud, which is usually very easy to do

If we could focus on this, because I believe it is necessary for all developers to be able to do something very similar to this, and MERN is failing at this for me right now.