ganelon.web.app documentation

This namespace provides additional handlers for Ganelon web apps.

app-handler

(app-handler & routes)
Provide basic Ganelon features:
* :default routes from ganelon.web.dyna-routes, providing actions and other routes defined in this group (e.g. using defpage or defjsonaction)
* Access to static resources for package 'public' with (compojure.route/resources "/")
* noir&ring middleware: noir-validation, request-map, keyword-params, nested-params, multipart-params, params, noir-cookies, noir-flash, noir-session

Takes additional Ring routes/handlers as parameters.

It is not required to use app-handler to access all of the Ganelon's features - you can assemble them in a different way,
according to the requirements of the application being developed.

Example usage:

(jetty/run-jetty
  (->
    (ganelon.web.app/app-handler
      (compojure.core/GET "/t1" [] "Hi!")
      (ganelon.web.app/javascript-actions-route))))

javascript-actions-route

(javascript-actions-route)
Return compojure route with access to JavaScript interface for actions, handled by ganelon.web.actions/javascript-actions-handler.

The route responds to GET /ganelon/actions.js.

Example usage:
(jetty/run-jetty
  (->
    (ganelon.web.app/app-handler
      (compojure.core/GET "/t1" [] "Hi!")
      (ganelon.web.app/javascript-actions-route))))