Liking cljdoc? Tell your friends :D

Configuring Routers

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

keydescription
: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
:meta-mergeFunction which follows the signature of meta-merge.core/meta-merge, useful for when you want to have more control over the meta merging
: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)
: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