Create a gist now

Instantly share code, notes, and snippets.

@jamiei /core.clj Secret
Created Oct 21, 2012

What would you like to do?
(ns webapp.core
(:use [webapp.routes]))
(defn -main [& args]
(defproject webapp "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.3.0"]
[compojure "1.0.1"]
[hiccup "1.0.0"]
[ring "1.1.6"]]
:plugins [[lein-ring "0.7.1"]]
:main webapp.core)
(ns webapp.routes
(:use [compojure.core])
(:require [compojure.route :as route]
[compojure.handler :as handler]
[ring.adapter.jetty :as jetty]
[ring.middleware.params :as ring-params]))
(defroutes public-routes
(PUT "/something" [& _ :as {params :params}]
(println (str "Params: " params))))
(def otherapp
(-> public-routes
(defn start-server []
(future (jetty/run-jetty (var otherapp) {:port 8080})))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment