Created
January 2, 2013 17:37
-
-
Save kognate/4436378 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 immutant.init | |
(:use irxcontrolcenter.core) | |
(:require [immutant.messaging :as messaging] | |
[immutant.web :as web] | |
[immutant.util :as util] | |
[ring.middleware.resource :as ring-resource]) | |
) | |
;; This file will be loaded when the application is deployed to Immutant, and | |
;; can be used to start services your app needs. Examples: | |
;; Web endpoints need a context-path and ring handler function. The context | |
;; path given here is a sub-path to the global context-path for the app | |
;; if any. | |
(defn not-found [request] | |
{:status 404 | |
:header {"Content-Type" "text/plain"} | |
:body (str "file not found at " request)}) | |
(web/start "/" app :reload true) | |
(web/start "/js" (ring-resource/wrap-resource not-found "public/js")) | |
;; To start a Noir app: | |
; (server/load-views (util/app-relative "src/irxcontrolcenter/views")) | |
; (web/start "/" (server/gen-handler {:mode :dev :ns 'irxcontrolcenter})) | |
;; Messaging allows for starting (and stopping) destinations (queues & topics) | |
;; and listening for messages on a destination. | |
; (messaging/start "/queue/a-queue") | |
; (messaging/listen "/queue/a-queue" #(println "received: " %)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment