kore.conf
The configuration file of an application describes to Kore what modules to load, how validators work, what page handlers to map to which functions and more.
Therefore it is an integral part of Kore as a whole.
Server context
A server context sets up a one or more listeners for the Kore server. These listeners can either be ipv4/ipv6 addresses or unix sockets.
You can also turn off TLS in a server context by specifying the tls no option inside of a context.
Example:
server tls {
bind 127.0.0.1 443
bind ::1 443
unix /var/run/socket.path
unix @linux-abstract-socket
}
server notls {
bind 127.0.0.1 80
tls no
}
Domain context
A domain context attaches to a server context and defines any available routes inside of that domain and how they are routed.
Example:
domain kore.io {
attach tls
route / {
handler index
methods get
}
}
Route context
A route context is specified inside of a domain context and will tell Kore how to handle requests to the given route, what methods are allowed and how to validate any parameters for that route.
Several different routing contexts can be given for the same path as long as the methods differ.
Example:
route / {
handler index
methods get
}
route / {
handler index_post
methods post
validate post username v_user
}
Configuration options.
Please see https://github.com/jorisvink/kore/blob/master/conf/kore.conf.example for all configuration options and what they do.