knomedia / hello-clojure

a quick docker + clojure service exploration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hello-clojure

setting up a quick docker + clojure service example. Takes a JSON package with an array of numbers and returns a sum of them.

About

This is just a small exploration into a minimal clojure service. It utilizes http-kit, compojure, and some ring middleware.

Usage

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"

License

Copyright © 2015 jmadsen

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

a quick docker + clojure service exploration

License:Eclipse Public License 1.0


Languages

Language:Clojure 100.0%