Possible Duplicate:
How to run an arbitrary startup function in a ring project?
I am using the clojure ring middleware, with compojure, to build a simple api. I deploy the app often as a war.
This works great, but I am looking at ways to have one off initialisation code run when the app starts. When I run "lein ring server" it runs just fine - however, when deployed as a war it seems to only run when the first request hits the server (i.e. lazy). Is there a way to make it not be lazy (without using AOT) - or is there a better way to hook into ring middleware lifecycle?