Migrating Node.js apps from AWS EB to Heroku
Warning
Over a year old. May be outdated
Danger
I wrote this when I had little experience with Node.js. This is not an advisable way. It's simply where my journey started.
I'd used AWS Elastic Beanstalk for a while and figured Heroku had several advantages over AWS, so I moved KMLA Forms to Heroku. KMLA Forms simplifies writing the necessary official documents at my school, KMLA.
A few advantages I found.
- Money. AWS charges once you pass the free tier. Since some of the students in my school used my web app, I got some traffic, and AWS started asking me for about ~$10/month. As far as I know, Heroku has no free tier traffic limit.
- Native HTTPS support. Every dyno app can use Heroku's domain, so HTTPS just works. AWS EB doesn't give you that. You have to set up your domain and an HTTPS certificate for each one. Not valid for casual developers.
I had to make only minimal changes to app.js and package.json.
AWS Version
Heroku Version
I also added "start": "node app.js" to package.json. Code is on GitHub, and the app is live here.
Backlinks1
221119