Liking cljdoc? Tell your friends :D

Configuring Routers

Routers can be configured via options. The following options are available for the reitit.core/router:

:pathBase-path for routes
:routesInitial resolved routes (default [])
:dataInitial route data (default {})
:specclojure.spec definition for a route data, see reitit.spec on how to use this
:syntaxPath-parameter syntax as keyword or set of keywords (default #{:bracket :colon})
:expandFunction of arg opts => data to expand route arg to route data (default reitit.core/expand)
:coerceFunction of route opts => route to coerce resolved route, can throw or return nil
:compileFunction of route opts => result to compile a route handler
:validateFunction of routes opts => () to validate route (data) via side-effects
:conflictsFunction of {route #{route}} => () to handle conflicting routes
:exceptionFunction of Exception => Exception to handle creation time exceptions (default reitit.exception/exception)
:meta-mergeFunction of left right => merged to merge route-data (default meta-merge.core/meta-merge)
:update-pathsSequence of Vectors with elements update-path and function, used to preprocess route data
:routerFunction of routes opts => router to override the actual router implementation

Can you improve this documentation? These fine people already did:
Tommi Reiman & Paulo Feodrippe
Edit on GitHub

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

× close