Skip to content

Instantly share code, notes, and snippets.

@cap10morgan
Created May 21, 2013 15:38
Show Gist options
  • Save cap10morgan/5620787 to your computer and use it in GitHub Desktop.
Save cap10morgan/5620787 to your computer and use it in GitHub Desktop.
Clojure liberator example that isn't working
(ns liberated.core
(:require [liberator.core :refer [resource defresource]]
[ring.adapter.jetty :refer [run-jetty]]
[compojure.core :refer [defroutes ANY]]))
(defroutes app
(ANY "/" [] (resource :available-media-types ["text/html"
"application/json"]
:handle-ok (fn [_] {:foo "Hello, Internet."}))))
(defn -main []
(run-jetty #'app {:port 3000}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment