(http-server {:keys [handler host port on-success websockets?] :as opts})
:host - hostname to bind :port - HTTP port the server will listen on :handler - Macchiato handler function for handling request/response :on-success - success callback that's called when server starts listening
:host - hostname to bind :port - HTTP port the server will listen on :handler - Macchiato handler function for handling request/response :on-success - success callback that's called when server starts listening
(https-server {:keys [handler host port on-success private-key certificate]
:as opts})
:host - hostname to bind :port - HTTP port the server will listen on :handler - Macchiato handler function for handling request/response :on-success - success callback that's called when server starts listening :private-key - path to the private key :certificate - path to the certificate for the key
:host - hostname to bind :port - HTTP port the server will listen on :handler - Macchiato handler function for handling request/response :on-success - success callback that's called when server starts listening :private-key - path to the private key :certificate - path to the certificate for the key
(start {:keys [handler host port protocol]
:or {host "0.0.0.0" protocol :http}
:as opts})
:host - hostname to bind (default 0.0.0.0) :port - HTTP port the server will listen on :protocol - :http or :https (default :http) :handler - Macchiato handler function for handling request/response :on-success - success callback that's called when server starts listening :private-key - path to the private key (only used when protocol is :https) :websockets? - boolean for enabling websockets :certificate - path to the certificate for the key (only used when protocol is :https)
:host - hostname to bind (default 0.0.0.0) :port - HTTP port the server will listen on :protocol - :http or :https (default :http) :handler - Macchiato handler function for handling request/response :on-success - success callback that's called when server starts listening :private-key - path to the private key (only used when protocol is :https) :websockets? - boolean for enabling websockets :certificate - path to the certificate for the key (only used when protocol is :https)
(start-ws server handler & [opts])
starts a WebSocket server given a handler and a Node server instance
starts a WebSocket server given a handler and a Node server instance
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close