How can I generate a standalone ring uberjar that listens to a given port ?
When developing I launch my app with the following leiningen/ring command, in which I can specify the port :
lein with-profile dev ring server-headless 9696
Now I want to deploy it, so I ran :
lein with-profile prod ring uberjar 9696
But I got an error :
Error encountered performing task 'ring' with profile(s): 'prod'
clojure.lang.ArityException: Wrong number of args (2) passed to: uberjar/uberjar
So I added a :portin my project.clj :
:ring {:handler img-cli.handler/handler
:init img-cli.handler/init
:destroy img-cli.handler/destroy
:port 9696}
lein with-profile prod ring uberjar
java -jar my-jar.jar
But then I see in the logs : Started server on port 3000
How do I generate an uberjar with the port that I want ?
Note : just in case, I'm using compojure.
lein with-profile +prod ring uberjar 9696(notice the+) - nha