From 7fac9087424e1f7c4b82bfb8426aca197f1f8904 Mon Sep 17 00:00:00 2001 From: Liam Crilly Date: Mon, 2 Oct 2023 09:43:57 +0100 Subject: 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. --- src/nxt_controller.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nxt_controller.c b/src/nxt_controller.c index 4e2e3749..eb814321 100644 --- a/src/nxt_controller.c +++ b/src/nxt_controller.c @@ -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); -- cgit