Documentation

QuickFix how to deploy a Loopback 4 Application to Heroku

When you are prototyping, sometimes you just need something to work, this was my case with a new experiment I’m working using Loopback 4 which I wanted to deploy for to Heroku for some rapid testing.

Generally CLI generated App’s doesn’t like environments like Heroku too much and since I later will deploy to DigitalOcean through some Docker containers, I just needed a QuickFix.

Anyways, let’s get to the point… this is a very opiniated post which takes for granted you are using the exact same development workflow that I have, if not, post a comment and I will do my best to help you out.

  1. Remove the /dist entry from .gitignore so it will be committed to Git, and subsequently caught by the CD routine running on Heroku through the GitHub Webhook.
  2. Remove the prestart script entry from package.json.
  3. Remove the “-r source-map-support/register” from the start script entry in package.json.

Now you are good to deploy it to Heroku via GitHub, however don’t forget to build before you commit.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s