Skip to content

Commit 7fac908

Browse files
committed
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.
1 parent b6216f0 commit 7fac908

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/nxt_controller.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,9 @@ nxt_controller_conf_default(void)
510510
nxt_mp_t *mp;
511511
nxt_conf_value_t *conf;
512512

513-
static const nxt_str_t json
514-
= nxt_string("{ \"listeners\": {}, \"applications\": {} }");
513+
static const nxt_str_t json = nxt_string(
514+
"{ \"listeners\": {}, \"routes\": [], \"applications\": {} }"
515+
);
515516

516517
mp = nxt_mp_create(1024, 128, 256, 32);
517518

0 commit comments

Comments
 (0)