I have used AWS Elastic Beanstalk for a while and figured Heroku has several advantages than AWS. So I have migrated my AWS EB app called KMLA Forms to Heroku. For your information, KMLA Forms is a web app that simplifies writing necessary official documents in my school, KMLA.

Few advantages I found:

  1. Money
    AWS costs money after its free tier limit. Since some of the students in my school used my web app, I have got some traffic, and AWS started to ask me about ~$10/month. As far as I know, there is no free tier traffic limit on Heroku.
  2. Native HTTPS support
    Heroku natively supports HTTPS, since every dyno app can use Heroku's own domain. AWS EB, on the other hand, does not provide this. You need to configure your own web domain and HTTPS Certificate for each web domain. Not useful for casual developers.

I had to make only minimal changes on app.js and package.json.

AWS Version

// app.js

// ...

http.createServer(app).listen(8081, "0.0.0.0");

console.log("Server up and running at http://0.0.0.0:8081");

Heroku Version

// app.js

// ...

const port = process.env.PORT || 8000;

// ...

app.listen(port, () => {
	console.log("App is running on port " + port);
});

Also, I have added "start": "node app.js" in package.json. Codes are on GitHub, and the web is launched here.