Routing
Backend routing
Routing
This project implements routing using Reitit with Ring, and Malli for request validation. Reitit provides a powerful and flexible routing system for Clojure web applications. For comprehensive information about route syntax and capabilities, consult the Reitit documentation.
The main file for server component is src/myproject/server.clj
. It contains the main function that starts the server and initializes the routing system. The routing system is defined in the routes
variable, which is a vector of routes.
Routes live in the src/myproject/routes.clj
file for convenience.
Middlewares
The project comes pre-configured with several middlewares that enhance security and provide convenient functionality. These middlewares are defined in the reitit-extras
helper library.
Pre-configured middleware set based on the ring-defaults.
You can easily extend the default middleware stack with your own custom middlewares by passing the :middlewares
option to the first argument of reitit-extras/get-handler-ssr
in the src/myproject/server.clj
file.