Cheap way to host a Javascript project. (e.g. Node APIs & React Apps)
Luke Cartwright
Posted on February 25, 2023
With the announcement of the removal of the free tier on Heroku, I, like many others was scrambling for an alternative.
Heroku used to offer free 'Dynos' but now are offering dynos for $7 which are always active or $5 for eco-dynos which go inactive after 30 minutes.
So what are some good alternatives?
I currently use these services and have done for the last 8 months or so. These are great services and are either the same or cheaper.
Digital Ocean
One option I chose for a Node API and React app was using Digital Ocean. I have been using this for the last 8 months and I found it very easy to setup. See my article on setting up an API on digital ocean.
The cost is $5 for a droplet and with the link below you can get a free $200 credit when you sign up to get started https://m.do.co/c/b6731a07428c.
How to deploy a node.js app to digital ocean using Docker
Luke Cartwright ・ Oct 30 '21
This is actually better value than Heroku because these Droplets don't become inactive after 30 mins and remain active like the Heroku $7 dynos.
AWS S3
Another way I have used is hosting a React app on AWS S3.
A React app is a static page when running 'npm run build' because the file is 1 html file with a minified JavaScript file. These files can be stored on a public S3 bucket.
This costs me a few pennies per month to host the static files.
I used these 2 resources to automatically run build and push to S3 everytime I push my code to GitHub. This uses a GitHub action and a S3 bucket.
- GitHub actions https://github.com/jakejarvis/s3-sync-action
Note: this contains a referral link but I have used this service for 8 months now and I have found it very helpful and good.
I hope these resources will be of a help to someone. Please share your thoughts below and with others if you think they will find it helpful
Posted on February 25, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.