DEV Community

Luke Cartwright
Luke Cartwright

Posted on

Cheap way to host a Javascript project. (e.g. Node APIs & React Apps)

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.


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.

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

Top comments (12)

Collapse
 
msveshnikov profile image
Max Sveshnikov

Oracle cloud, Always free tier, I have Ampere server with 4cpu and 24g RAM for 2 years for free.

Collapse
 
baasmurdo profile image
BaasMurdo

I use Github pages, works very well for me once it is setup.

Collapse
 
lukeecart profile image
Luke Cartwright

That's true, similar to the S3 method by building the minified js files and hosting them

Collapse
 
lukeecart profile image
Luke Cartwright

Had anyone tried using Kubernetes on a personal project? 🫣🫣

Collapse
 
lukeecart profile image
Luke Cartwright

Where do you guys host your JS projects?

Collapse
 
lukeecart profile image
Luke Cartwright

Hostinger is also a great option.

You can get 20% off using this link:
hostinger.co.uk?REFERRALCODE=1LUKE...

Collapse
 
allenarduino profile image
Allen Jones • Edited

On vercel app or Google cloud

Collapse
 
lukeecart profile image
Luke Cartwright

Great suggestions, is Google cloud cheap?
Is it easy enough to deploy?

Collapse
 
lukeecart profile image
Luke Cartwright

I use Vercel for a next js app.

Collapse
 
syeo66 profile image
Red Ochsenbein (he/him)

Running CapRover on a VPS at Contabo.

Collapse
 
lukeecart profile image
Luke Cartwright

I've never heard of this, what the cost like?

Collapse
 
syeo66 profile image
Red Ochsenbein (he/him) • Edited

Just the price of the VPS.
contabo.com/en/vps/