Created
June 10, 2010 00:29
-
-
Save anonymous/432400 to your computer and use it in GitHub Desktop.
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 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