(app config)
Create a ring handler from a config map. Config map:
:router
- A reitit router. Reitit Docs:disable-logs?
- A boolean to disable logs. Default is false
:openapi
- A map with openapi options. Reitit OpenAPI Docs:swagger
- A map with swagger options. Reitit Swagger Docs:middlewares
- A vector of middlewares.Observations:
:openapi
nor :swagger
are provided, the server will not serve any openapi or swagger documentation.Create a ring handler from a config map. Config map: - `:router` - A reitit router. [Reitit Docs](https://cljdoc.org/d/metosin/reitit/0.6.0/doc/basics/router) - `:disable-logs?` - A boolean to disable logs. Default is `false` - `:openapi` - A map with openapi options. [Reitit OpenAPI Docs](https://cljdoc.org/d/metosin/reitit/0.7.0-alpha7/doc/ring/openapi-support?q=openapi#openapi-support) - `:swagger` - A map with swagger options. [Reitit Swagger Docs](https://cljdoc.org/d/metosin/reitit/0.7.0-alpha7/doc/ring/swagger-support) - `:middlewares` - A vector of middlewares. Observations: - When neither `:openapi` nor `:swagger` are provided, the server will not serve any openapi or swagger documentation. - Middlewares are applied using sieppari.
(start! {:keys [server-id] :as config})
Start a server from a config map. Config map:
:server-id
- A unique identifier for the server. Used to stop the server.:join?
- A boolean to join the server thread. Default is false
:port
- A port number. No default is provided:host
- A host name. Defaults to 0.0.0.0
app
function accepts.Notes:
app
function.Start a server from a config map. Config map: - `:server-id` - A unique identifier for the server. Used to stop the server. - `:join?` - A boolean to join the server thread. Default is `false` - `:port` - A port number. No default is provided - `:host` - A host name. Defaults to `0.0.0.0` - Accpts any parameter that `app` function accepts. Notes: - Ring handler is created internally using `app` function. - Shutdown hook is automatically added to stop the server when the JVM is stopped.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close