From fa9463e1d8506b0789bd4242536a059ed3210638 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Sat, 18 Nov 2023 15:37:57 -0500 Subject: [PATCH] src: add `--config-file=path` support to Node.js --- doc/api/cli.md | 12 ++++++ doc/node-config-schema.json | 14 ++++++ node.gyp | 2 + src/node.cc | 19 ++++++-- src/node_config_file.cc | 86 +++++++++++++++++++++++++++++++++++++ src/node_config_file.h | 34 +++++++++++++++ src/node_options.cc | 4 ++ src/node_options.h | 2 + 8 files changed, 169 insertions(+), 4 deletions(-) create mode 100644 doc/node-config-schema.json create mode 100644 src/node_config_file.cc create mode 100644 src/node_config_file.h diff --git a/doc/api/cli.md b/doc/api/cli.md index 6b1860ecc81980..19b3a4f36f89ab 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -374,6 +374,18 @@ For example, to run a module with "development" resolutions: node -C development app.js ``` +### `--config-file=path` + +> Stability: 1.1 - Active development + + + +Write a documentation for here. +- Mention the order of preferrence for environment variables, config file, and command line arguments. +- Mention the JSON schema. + ### `--cpu-prof`