-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathimmutant.clj
26 lines (18 loc) · 872 Bytes
/
immutant.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(ns jbctest2.init
(:use jbctest2.core)
(:require [immutant.messaging :as messaging]
[immutant.web :as web]))
;; 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.
(web/start "/" ring-handler)
; (web/start "/foo" a-different-ring-handler)
;; To start a Noir app:
; (server/load-views (str (web/src-dir) "/<(str ns)>/views"))
; (web/start "/" (server/gen-handler {:mode :dev :ns '<(str ns)>}))
;; Messaging allows for starting (and stopping) destinations (queues & topics)
;; and listening for messages on a destination.
(messaging/start "/topic/cluster")
(messaging/listen "/topic/cluster" message-handler)