...
- Go to https://toolbelt.heroku.com
- Hit the download button for you OS.
- Once you have created your Heroku account you give your credentials after typing in the command line
$ heroku login
...
Install the Heroku-deploy plugin
This project is a Heroku toolbelt plugin for deploying WAR files. It can also be used to deploy executable JAR files.
Using the Heroku toolbelt you can write in the command line:
$
heroku
plugins:install
https://github.com/heroku/heroku-deploy
Check if the heroku-deploy plugin is installed by typing in the command line
$ heroku plugins
And if everything is ok you will see:Code Block language bash === Installed Plugins
heroku-deploy
Creating a Heroku application
...
- In the folder you have created for your app in this case termweb-heroku you must have the following files: 1. .WAR file 2.Procfile.
- Procfile creation details go to: https://devcenter.heroku.com/articles/procfile
- As soon as all the required files are in the folder enter the command so as to deploy your code in Heroku:
$ heroku deploy:war --war <your war file> --app <your heroku app name> - After the deployment you can now open your application in the browser by typing:
$ heroku open --app <your heroku app name>
Database creation
You can go to your Heroku dashboard (https://dashboard.heroku.com/apps), choose your dyno and then go to Add-ons and add Heroku Postgress database, or again by giving the command in the command line:
...