setting up a quick docker + clojure service example. Takes a JSON package with an array of numbers
and returns a sum of them.
This is just a small exploration into a minimal clojure service. It utilizes http-kit, compojure, and some ring middleware.
These directions assume you have dinghy
setup (otherwise you'll need to do some inspecting to determine IP and port)
Start up the app
docker-compose build web
docker-compose run web
Hit the main endpoints:
curl http://hello-clojure.docker
POST to the /sum
endpoint
curl -X POST http://hello-clojure.docker/sum \
-d '{"numbers": [1,2,7]}' \
--header "Content-type:application/json"
Copyright © 2015 jmadsen
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.