brew install leiningen
Create a profiles.clj in the root of the project and add custom overrides
{ :profiles/dev { :jvm-opts ["-Dhttp.port=8080"] }}
$ lein run
$ curl localhost:4000/ruok
;;=> imok%
lein repl
;; start application
user=> (go)
;; refesh code
user=> (reset)
;; run tests
user=> (test)
lein uberjar
$ java -cp target/sample-web-*-standalone.jar -Dhttp.port=8080 sample.app
$ curl localhost:8080/ruok
$ curl localhost:4000/ruok
imok%
$ curl localhost:4000/store/get/foo
bar%
$ curl localhost:4000/store/get/foo1
key not found foo1%
$ curl -X POST localhost:4000/store/put/foo1 -d '{"foo1": "42"}'
json object posted %
$ curl -X POST -H "Content-type: application/json" localhost:4000/store/put/foo1 -d '{"foo1": "42"}'
ok%
$ curl localhost:4000/store/get/foo1
{:foo1 "42"}%
Documentation: