JAX-RS is a great way to build RESTful services in Java. This is a very quick and simple example of how you can deploy a JAX-RS application on Heroku.
Assuming you're already set up with Heroku including the foreman tool, all you need to do to run this locally is
- Clone this repo
- cd into the directory
- mvn package
- foreman start
To deploy to Heroku:
- heroku create --stack cedar
- git push heroku master
- curl http://[appname].herokuapp.com/hello
It's that simple.
The master branch currently uses Grizzly. If you want to use Jetty, check out the jetty branch instead:
$ git clone -b jetty [email protected]:jesperfj/jax-rs-heroku.git