DEV Community

Lori "Lei" Boyd
Lori "Lei" Boyd

Posted on

How To deploy Your Web App To Heroku

Alt Text

As my time as a bootcamp student is coming to an end, I've built a couple of web apps that I'd like to share with the world. So I'm going to show you how you can do just that.

Heroku lets you host 5 apps for free so choose them wisely. If you're like me and you haven't make separate repos for your api and client, here's a blog to help you out.

Start by creating a new app on the Heroku website.

Alt Text

When you're done, you'll be redirected to the deploy tab. There, you'll be greeted with information about pipelines, and more importantly, deployment methods. You have the option to use Heroku Git, GitHub and the Container Registry. I'll be using Heroku Git.

Download and install Heroku CLI and run heroku login in your terminal.

Next, clone your new repo in your app's root directory.

$ heroku git:clone -a <heroku-app-name>
$ cd <heroku-app-name>

Lastly, commit any changes you make to deploy.

$ git add .
$ git commit -am "make it better"
$ git push heroku master

If you're deploying a rails API you will need to migrate and seed if needed. You can do this by using Heroku's console.

Alt Text

Top comments (1)

Collapse
 
nocnica profile image
Nočnica Mellifera

cool to see and really well-illustrated! message me and let's talk about writing more about Heroku!