Proper way to deploy MERN app

There’s so many different ways to architect a MERN app. How do I deploy a MERN app where I have the client side and server side self contained in seperate folders and no global gitignore or package.json. Both foders have their own files. I am also using socket.io with env references to the client side url running on local host. Any help would be appreciated as this has been very frustrating for a beginner. Thank you in advance.

You’ve got a number of options here but it’s very much down to how your repo is structured, you’re absolutely right - there’s no right and wrong way.

Whilst we don’t have a specific guide, some googling led me to:

https://dev.to/gregpetropoulos/render-deployment-free-tier-of-mern-app-52mk

and something else you might want to consider is using our Monorepo https://render.com/docs/monorepo-support feature which lets you specify which folders are deployed to which service but that depends on your folder structure.

John B

I’ve got the front end up now. However, I’m reading that Render does not support mongodb connection. Is this true? The post was from june 21st. EDIT: Nevermind. It was an old post. My only issue now is getting mongodb to connect. I’ve whitelisted all ip’s on the database. However, I don’t know anything about seeding the mongodb as greg does in that article. Is that necessary? EDIT 2: Nevermind again. I’ve got the backend deployed now. I went back to the older node version connection string without the srv. I probably could have enabled useNewUrlParser and useUnifiedTopology as an alternative. Anyway, thanks for the help and the fast response, John. You’re the man.