Hello community, I have a question here,
I build a app with the MERN Stack, and I decided separate the front from the back.
I thought of upload the static front in github pages, but, I dont know what is the best host to upload my backend.
A host that allows you to store the files that are sent from my frontend and update the database (which I already have made in mlab).
Any know a good solution for this?
Now I tested my entire app in heroku, but the files I upload are removed 24 hours later.
Thanks and nice week :)
Top comments (5)
Hi there! That's weird about Heroku. I've been using the free dynos for dev and test environments for a year and have had no issues so far.
I guess you have 2 free dynos, one for the front and one for the back? Would you mind sharing a bit more about your Heroku config? I may be able to help.
On the other hand, as @devdrake0 suggested, Digital Ocean is a great alternative and fairly cheap. But you'll have to set up a web server, like Nginx, and a process manager for your Node.js backend, like PM2. You can still keep your data on MLab, though.
Hi Paula!, finally I used heroku for the back, and now.sh for the front.
So take the opportunity to know a little more about both at the same time haha
When I say that the files uploaded in Heroku are removed after 24 hours, I mean the files uploaded via POST in a form for example. Heroku not store files at least in its free version, isn't it?
Thanks for your help :)
Oh I get it now 😂
Glad you solved it. Now + Heroku is a nice combo!
Are you specifically looking for something free? You could spin up a Digital Ocean droplet for $5 a month, which will give you invaluable experience of setting up / managing a Linux server and using reverse proxies etc.
I can share a link with you that will give you $50 in credit over 30 days, so you can try it?
Disclaimer: the link will also give me $25 in credit if you decide to continue with them - but there is no obligation to do so and that is not my main driver here.
how about now.sh , the free tier should be enough for this :)