Skip to content

@jamiei /core.clj secret

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
(ns webapp.core
(:gen-class)
(:use [webapp.routes]))
(defn -main [& args]
(start-server)
)
(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
ring-params/wrap-params
))
(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
Something went wrong with that request. Please try again.