O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

  1. Run the following command to create a Heroku application:
      $ heroku create <app_name> -region us
  1. Initialize the Git repository in the project folder:
      $ git init
  1. Add the Heroku Git repository as a remote to your local Git repository:
      $ heroku git:remote -a <app_name_you_chose>
  1. Push the source code, that is, the master branch, to the Heroku Git repository:
      $ git add .      $ git commit -m "deploying to heroku"      $ git push heroku master
  1. When the code is pushed to the Heroku Git repository, it triggers a build. As we are using Maven, it runs the following command:
      ./mvnw -DskipTests clean dependency:list install
  1. Once the code has completed the build and deployed, you can open the application by using the heroku open

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required