Skip to content

Instantly share code, notes, and snippets.

Created June 10, 2010 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/432400 to your computer and use it in GitHub Desktop.
Save anonymous/432400 to your computer and use it in GitHub Desktop.
(ns chdweb.server
(:use compojure.core
ring.adapter.jetty
clojure.contrib.json.write)
(:require [compojure.route :as route])
(:require [chdweb.util :as u])
(:import java.io.File))
(defroutes chdweb
(GET "/" [] "<h1>testing</h1>")
(GET "/files/encrypted" []
{:status 200
:headers {"Content-Type" "application/json"}
:body (u/enc-files-as-json)})
(GET "/files/decrypted" []
(u/dec-files-as-json))
(route/not-found "Not found"))
(defonce server (run-jetty #'chdweb {:port 8080 :join? false}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment