Added routes array to the default configuration.
The default configuration previously contained just a listeners and applications object. Since routes is now a principle configuration object, and a recommended way of configurating Unit, it is now included in the default configuration. This change benefits new users because it explicitly introduces the three principle configuration objects which leads more intuitively to the documentation. Experienced users may choose to ignore or delete routes. routes is defined as an array instead of an object because this change is designed to assist new users, where the simpler form of routes is easier to understand.
This commit is contained in:
@@ -510,8 +510,9 @@ nxt_controller_conf_default(void)
|
||||
nxt_mp_t *mp;
|
||||
nxt_conf_value_t *conf;
|
||||
|
||||
static const nxt_str_t json
|
||||
= nxt_string("{ \"listeners\": {}, \"applications\": {} }");
|
||||
static const nxt_str_t json = nxt_string(
|
||||
"{ \"listeners\": {}, \"routes\": [], \"applications\": {} }"
|
||||
);
|
||||
|
||||
mp = nxt_mp_create(1024, 128, 256, 32);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user