(run-server handler)
(run-server handler options)
Start and ratpack webserver to serve the given handler according to the supplied options:
:port
: the port to listen on (defaults to 5050).:host
: the host to listen on.:address
: the ip address to listen on (defaults to localhost).:threads
: the number of threads (default: number of cores * 2).:debug
: start in development mode or not (default: true
).:setup
: callback for add additional entries in ratpack registry.:basedir
: the application base directory. Used mainly for resolve relative paths and assets.:decorators
: a list of handlers that will be chained at the first of the request pipeline.:public-address
: force a specific public address (default: nil
).:max-body-size
: set the maximum size of the body (default: 1048576 bytes (1mb)):marker-file
: the file name of the marker file that will be used for establish
the base directory (default catacumba.marker
).Additional notes:
:basedir
is used mainly to resolve relative paths for assets. When you set
no basedir it first try to find a catacumba.marker
file in the root of you classpath if
it cannot find that it will run without a basedir.:publicaddress
you can force one specific public address, in case contrary it
will be discovered using a variety of different strategies explained in the
public-address
function docstring.CATACUMBA_BASEDIR
environ variable or
catacumba.basedir
jvm system property for overwrite the :basedir
parameter
value.This function does not blocks and you can execute it in a repl without problems. It uses jvm not daemon threads for avoid shutdown the jvm.
Start and ratpack webserver to serve the given handler according to the supplied options: - `:port`: the port to listen on (defaults to 5050). - `:host`: the host to listen on. - `:address`: the ip address to listen on (defaults to localhost). - `:threads`: the number of threads (default: number of cores * 2). - `:debug`: start in development mode or not (default: `true`). - `:setup`: callback for add additional entries in ratpack registry. - `:basedir`: the application base directory. Used mainly for resolve relative paths and assets. - `:decorators`: a list of handlers that will be chained at the first of the request pipeline. - `:public-address`: force a specific public address (default: `nil`). - `:max-body-size`: set the maximum size of the body (default: 1048576 bytes (1mb)) - `:marker-file`: the file name of the marker file that will be used for establish the base directory (default `catacumba.marker`). Additional notes: - The `:basedir` is used mainly to resolve relative paths for assets. When you set no basedir it first try to find a `catacumba.marker` file in the root of you classpath if it cannot find that it will run without a basedir. - With `:publicaddress` you can force one specific public address, in case contrary it will be discovered using a variety of different strategies explained in the `public-address` function docstring. - You can set all that parameters using environment variables or jvm system properties. For example, you can use `CATACUMBA_BASEDIR` environ variable or `catacumba.basedir` jvm system property for overwrite the `:basedir` parameter value. This function does not blocks and you can execute it in a repl without problems. It uses jvm not daemon threads for avoid shutdown the jvm.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close