Liking cljdoc? Tell your friends :D

noir.server

A collection of functions to handle Noir's server and add middleware to the stack.

A collection of functions to handle Noir's server and add middleware to the stack.
raw docstring

add-middlewareclj

(add-middleware func & args)

Add a middleware function to the noir server. Func is a standard ring middleware function, which will be passed the handler. Any extra args to be applied should be supplied along with the function.

Add a middleware function to the noir server. Func is a standard ring middleware
function, which will be passed the handler. Any extra args to be applied should be
supplied along with the function.
sourceraw docstring

gen-handlerclj

(gen-handler & [opts])

Get a full Noir request handler for use with plugins like lein-ring or lein-beanstalk. If used in a definition, this must come after views have been loaded to ensure that the routes have already been added to the route table.

Get a full Noir request handler for use with plugins like lein-ring or lein-beanstalk.
If used in a definition, this must come after views have been loaded to ensure that the
routes have already been added to the route table.
sourceraw docstring

load-viewsclj

(load-views & dirs)

Require all the namespaces in the given dirs so that the pages are loaded by the server.

Require all the namespaces in the given dirs so that the pages are loaded
by the server.
sourceraw docstring

load-views-nsclj

(load-views-ns & ns-syms)

Require all the namespaces prefixed by the namespace symbol given so that the pages are loaded by the server.

Require all the namespaces prefixed by the namespace symbol given so that the pages
are loaded by the server.
sourceraw docstring

restartclj

(restart server)

Restart a noir server

Restart a noir server
sourceraw docstring

startclj

(start port & [opts])

Create a noir server bound to the specified port with a map of options and return it. The available options are:

:mode - either :dev or :prod :ns - the root namepace of your project :jetty-options - any extra options you want to send to jetty like :ssl? :base-url - the root url to prepend to generated links and resources :resource-options - a map of options for the resources route (:root or :mime-types) :session-store - an alternate store for session handling :session-cookie-attrs - custom session cookie attributes

Create a noir server bound to the specified port with a map of options and return it.
The available options are:

:mode - either :dev or :prod
:ns - the root namepace of your project
:jetty-options - any extra options you want to send to jetty like :ssl?
:base-url - the root url to prepend to generated links and resources
:resource-options - a map of options for the resources route (:root or :mime-types)
:session-store - an alternate store for session handling
:session-cookie-attrs - custom session cookie attributes
sourceraw docstring

stopclj

(stop server)

Stop a noir server

Stop a noir server
sourceraw docstring

wrap-routeclj

(wrap-route route middleware & args)

Add a middleware function to a specific route. Route is a standard route you would use for defpage, func is a ring middleware function, and args are any additional args to pass to the middleware function. You can wrap the resources and catch-all routes by supplying the routes :resources and :catch-all respectively:

(wrap-route :resources some-caching-middleware)

Add a middleware function to a specific route. Route is a standard route you would
use for defpage, func is a ring middleware function, and args are any additional args
to pass to the middleware function. You can wrap the resources and catch-all routes by
supplying the routes :resources and :catch-all respectively:

(wrap-route :resources some-caching-middleware)
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close