On this page
One of the most popular solutions to deploy web applications and websites is PaaS (platform as a service). Fortunately, GroupDocs.Comparison API developed to be easily integrated with them. This article describes the way you can deploy comparison example, developed with Spring Framework, to one of very popular PaaS platform - Heroku. The comparison example is completely free to use and modify. It is available on GitHub page.
Next applications must be installed to deploy the sample to Heroku server
Heroku CLI- tool to access Heroku account (of course, you need an account)
Git- tool to download sample application and to deploy it to Heroku server
Using green button
Codeon the right top of the page copy HTTPS repository link
Open Linux terminal or Windows Command Line and run the next command
git clone https://github.com/groupdocs-comparison/GroupDocs.Comparison-for-Java.git
The command will download project with samples from GitHub to your local directory. Do not close the command line
- Maven profile to build JAR file is configured and active by default
- Sample configured to use
PORTenvironment variable (file
configuration.yml). It is important, because Heroku can change port each time app starts
- To say Heroku how to run the application was created special file (
system.propertieswas created to specify Java version our app needs
Run next command in order to go to samples directory and to log in with Heroku account
The last command will open Heroku website where you should log in to grand command line tool access to your account
Use next command to create new Heroku application
my-spring-compareris the name of the app. You can change it however you want, but it must be unique. The result of the command will be a web url to access your new app and a link to heroku git repository. Here is an example of command line output:
https://my-spring-comparer.herokuapp.com/ | https://git.heroku.com/my-spring-comparer.git
Next, add heroku repository link as a remote to sample app repository using next command:
my-spring-compareris the name of Heroku app,
heroku-springis a name that will be used by git to identify heroku repository. You can change it, but don’t forget new one.
Deploy the application to Heroku server using next command
Demos/Springa path to the sample you want to push. The root of the path is a root directory of git project of the sample.
heroku-springis heroku repository name from previous step, that is used to identify it.
masteris a git branch in Heroku repository. At the moment Heroku deploys only
The command will upload Spring sample to Heroku server and start building it. You will see the output of the build process in the command line. Everything must finish successfully. If so, just open link from step 2 (https://my-spring-comparer.herokuapp.com/) in your favourite browser to see uploaded application. In order to check the app you can upload few files using Comparison UI.
You can manage your applications in Heroku web interface
Use next command to show common help of Heroku CLI
To show help for definite command, type it after
To show logs of specific application use next command (add
--tailparameter to see logs in real time)
It is possible to access remote filesystem using next command
Don’t forget, all changes in remote filesystem will be lost when the app restarts
You can restart the app using next command
GroupDocs.Comparison API is a modern, useful and very powerful solution to compare different documents, files and images, while its samples are completely free to use and open to be modified. You can change them to work with Heroku add-ons, for example database or files storages. Spring sample has different configurations (see
configuration.yml) which are available by setting environment variables. You can do it in Heroku web interface or from the command line. Moreover, Spring sample has implementations of using Google Drive API and Dropbox API as a sources of files for comparison. To find out more see Google Drive API integration and Dropbox API integration pages
Lots of comparison settings, for example, generating summary page, sensitivity of comparison and so on, are available only with license. You can get a free temporary license in order to use the API without evaluation limitations.
Comparison sample application created with Spring Framework as a core, is just one example of using GroupDocs.Comparison API for comparing Pdf, Word, Excel documents, PowerPoint presentations, Diagrams, CAD files, images and much more supported file formats. There are more samples of using GroupDocs.Comparison with Java and Kotlin on GitHub page. To get more details, options, and examples, you can go through the documentation and GitHub repository. Reach us on the forum for your queries.
- How to compare documents in the easiest way
- How to compare AutoCad files in Java or Kotlin
- How to depoy Ktor sample to Heroku PaaS platform
- How to compare images using Java or Kotlin
- How to compare two or more files in Java or Kotlin
- How to depoy Dropwizard sample to Heroku PaaS platform
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.