Liking cljdoc? Tell your friends :D

logic.fetch.macros

Functions/Macros to work with partials and pages. Extracted from noir source code.

Functions/Macros to work with partials and pages.
Extracted from noir source code.
raw docstring

compojure-routesclj

source

defpagecljmacro

(defpage & args)

Adds a route to the server whose content is the the result of evaluating the body. The function created is passed the params of the request and the destruct param allows you to destructure that meaningfully for use in the body.

There are several supported forms:

(defpage "/foo/:id" {id :id}) an unnamed route (defpage [:post "/foo/:id"] {id :id}) a route that responds to POST (defpage foo "/foo:id" {id :id}) a named route (defpage foo [:post "/foo/:id"] {id :id})

The default method is GET.

Adds a route to the server whose content is the the result of evaluating the body.
The function created is passed the params of the request and the destruct param allows
you to destructure that meaningfully for use in the body.

There are several supported forms:

(defpage "/foo/:id" {id :id})  an unnamed route
(defpage [:post "/foo/:id"] {id :id}) a route that responds to POST
(defpage foo "/foo:id" {id :id}) a named route
(defpage foo [:post "/foo/:id"] {id :id})

The default method is GET.
sourceraw docstring

defpartialcljmacro

(defpartial fname & args)

Create a function that returns html using hiccup. The function is callable with the given name. Can optionally include a docstring or metadata map, like a normal function declaration.

Create a function that returns html using hiccup. The function is callable with the given name. Can optionally include a docstring or metadata map, like a normal function declaration.
sourceraw docstring

noir-routesclj

source

post-routesclj

source

pre-routesclj

source

route-funcsclj

source

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

× close