Created
March 13, 2012 18:00
-
-
Save zoka/2030301 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 noirmon.server | |
(:require [noir.server :as server] | |
[noirmon.models :as models] | |
[ringmon.monitor :as monitor])) | |
(server/load-views "src/noirmon/views/") | |
(defn -main [& m] | |
(let [mode (keyword (or (first m) :dev)) | |
port (Integer. (get (System/getenv) "PORT" "8080"))] | |
(models/initialize) ; initialize blog models | |
; This is the only thing to be done (besides including it | |
; in project depedency) to inject ringMon page into the | |
; application. | |
(server/add-middleware monitor/wrap-ring-monitor) | |
(server/start port {:mode mode | |
:ns 'noirmon}))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment