Skip to content

Instantly share code, notes, and snippets.

@jarohen
Created December 21, 2013 22:35
Show Gist options
  • Select an option

  • Save jarohen/8076013 to your computer and use it in GitHub Desktop.

Select an option

Save jarohen/8076013 to your computer and use it in GitHub Desktop.
Example Frodo handler
(ns your-app.handler
(:require [compojure.core :refer [routes GET]]
[compojure.handler :refer [api]]
[ring.util.response :refer [response]]))
(defn app-routes []
(let [system (init-system)]
(routes
(GET "/route/:id" [id]
(response (handle-get system id)))
...)))
(defn app []
(-> (app-routes)
api))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment