DEV Community

loizenai
loizenai

Posted on

How to Deploy Angular application on Heroku hosting with Git repository

https://grokonez.com/frontend/angular/angular-deployment/how-to-deploy-angular-application-on-heroku-hosting-with-git-repository

How to Deploy Angular application on Heroku hosting with Git repository

In the tutorial, we show you how to automatically deploy Angular application on Heroku hosting with Git repository.

Related post:
Angular 6 dynamic Navigation Bar – add/remove Route dynamically

Technologies

  • Angular
  • Git
  • Heroku

    Goal

    We use Heroku Hosting to deploy Angular application ->

deploy-angular-application-on-heroku-hosting---deployment-successfully

  • Video guide ->

Practice

Create Heroku App

Login to Heroku, and create an app grokonez-angular-app:

deploy-angular-application-on-heroku-hosting-create-app

deploy-angular-application-on-heroku-hosting-create-app-step-2

Commit Angular to Git Repository

  • Create an Git repository: angularheroku.

  • Download sourcecode & unzip:


wget "https://grokonez.com/wp-content/uploads/2018/12/AngularDynamicRoutes-2.zip"
unzip AngularDynamicRoutes-2.zip
  • Commit Angular application to Git repository:

git init
git remote add origin https://github.com/grokonez/angularheroku.git
git add .
git commit -m "initial commit"
git push -u origin master

deploy-angular-application-on-heroku-hosting---push-sourcecode-to-git

*Note: We don't push the node_modules, in .gitignore we have:

More at:

https://grokonez.com/frontend/angular/angular-deployment/how-to-deploy-angular-application-on-heroku-hosting-with-git-repository

How to Deploy Angular application on Heroku hosting with Git repository

Top comments (0)