I recently worked on a small personal project. I choose MERN stack as it would have been a good learning experience. Node is completely different beast when compared with Rails(working with rails for the past 6 years). So after developing some parts of the application which I think would work out for me, I thought I should
For small apps I prefer heroku as I think it is the most time efficient PaaS system out there to work with. For a rails application, deploying on heroku is easier than having a piece of cake. But while deploying a MERN application I found out that it wasn’t going to be as easy as I thought it would be. So documenting the same below.
I have a setup in which I have a root project folder with a client folder serving react frontend and a backend folder for serving the node/express on dev.
If you are using some tool like nodemon or concurrently on your dev machine then you need to make some changes for deploying your code. The express server needs to serve both the frontend and the backend routes.