Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(ns tor-cluster.server
(:use aleph.http
aleph.formats
aleph.tcp
noir.core
lamina.core)
(:require
[noir.server :as nr-server]))
(nr-server/load-views-ns 'tor-cluster.views)
(def site-handler (nr-server/gen-handler {:mode :dev
:ns 'tor-cluster}))
(defn -main [& m]
(let [mode (keyword (or (first m) :dev))
port (Integer. (get (System/getenv) "PORT" "8080"))
noir-handler site-handler]
(start-http-server
(wrap-ring-handler noir-handler)
{:port port :websocket true})))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.