Created
May 21, 2013 15:38
-
-
Save cap10morgan/5620787 to your computer and use it in GitHub Desktop.
Clojure liberator example that isn't working
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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