I was recently pointed in the direction of dropwizard and heroku for the relatively easy creation and deployment of restFUL webservices.
Having followed the getting started tutorial at http://dropwizard.readthedocs.org/en/latest/getting-started.html I soon had a simple Hello World service running on my localhost, no problems at all.
Moving onto trying to deploy this on Heroku I have hit an issue. On deploying the app to heroku, I get an error
2014-08-14T11:34:59.869067+00:00 heroku[web.1]: State changed from starting to crashed
2014-08-14T11:34:59.070364+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web
process failed to bind to $PORT within 60 seconds of launch
2014-08-14T11:34:59.070573+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-08-14T11:34:59.857478+00:00 heroku[web.1]: Process exited with status 137
web java $JAVA_OPTS -D.http.port=$PORT -jar target/exampleMavenProject-0.0.1-SNAPSHOT.jar server hello-world.yml
template: Hello, %s!
Dropwizard 0.7.x has changed their server configurations; in particular,
http.port does not work anymore.
Instead, you should be using
server.connector.port for your procfile/.yml files. Here's an example:
web: java $JAVA_OPTS -Ddw.server.connector.port=$PORT -jar target/pos-tagger-1.0-SNAPSHOT.jar server src/main/resources/POSTagger.yml
server: type: simple applicationContextPath: / adminContextPath: /admin connector: type: http port: 8080
If you want to see a full, working heroku example using 0.7.x, check out: https://github.com/xinranxiao/POSTagger