I have a Ring app that through deploys to production as an uberwar
thing; myservice.war. In production the WAR file gets tossed into Jetty where it runs in a context that follows its name
$ curl -i -X GET http://myservice.qa1.example.com:8080/myservice/healthz
HTTP/1.1 200 OK
...
When I run locally through lein ring, I need it to run in the same context; myservice.
$lein ring server-headless
2015-10-14 14:04:03,457 level=INFO [main] Server:271 - jetty-7.6.13.v20130916
2015-10-14 14:04:03,482 level=INFO [main] AbstractConnector:338 - Started [email protected]:10313
Started server on port 10313
But the same curl goes all 404 on me locally.
$ curl -i -X GET http://localhost:10313/myservice/healthz
HTTP/1.1 404 Not Found
...
The lein ring thing deployed it onto the root context.
$ curl -i -X GET http://localhost:10313/healthz
HTTP/1.1 200 OK
...
Whats up with that? How do I direct lein ring to deploy into a context name of my choosing? I need curl -i -X GET http://localhost:10313/myservice/healthz
to work from lein ring