-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
albe194e edited this page Dec 25, 2024
·
6 revisions
RunicHttp supports multiple ways to make proper configurations for your http server. The purpose here is to enable you the developer to decide what makes sence for YOU and not the framework.
sc : http.Server_config = {
url = "127.0.0.1",
port = 80
}
sc := http.load_config_from_file("server_config.json", .SERVER);
Defualt values can be found in src\config_defaults.odin
Right now only JSON files are supported
- Create your
JSONfile. Location is irrelevant since you specify the path in the procedure. - Add ONLY the desired config struct fields.
JSONattributes that do not corresponds with a field in the struct will raise an error. Fields that are ignored will use defualt values. Example of a config file forServer_config:
{
"port" : 80,
"url" : "127.0.0.1"
}