Liking cljdoc? Tell your friends :D

macchiato.server


http-servercljs

(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
sourceraw docstring

https-servercljs

(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
sourceraw docstring

startcljs

(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)
sourceraw docstring

start-wscljs

(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
sourceraw docstring

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

× close