Module ReWeb.Config

Configure and override the behaviour of ReWeb and applications built with it.

You can use and override this configuration by setting the values of environment variables with names derived from the names in the S module type below by prefixing REWEB__. For example, REWEB__buf_size. You can set up your own configuration by using the functions below.

Another technique to customize configuration is creating a custom config module. However that is primarily intended for testing and is covered in the manual: Manual.Ch06_Configuration.

You can also create a configuration module in your own application that reads values from the system environment, by using the (type-safe) functions below.

val string : string -> string option

string(name) gets a value from the system environment variable with the name REWEB__name. The following functions all use the same name prefix and work for their specific types.

val bool : string -> bool option
val char : string -> char option

char(name) gets the first character of the value of the system environment variable named REWEB__name.

val float : string -> float option
val int : string -> int option
module type S = sig ... end

The known ReWeb configuration settings.

module Default : S

Default values for ReWeb configuration settings.