Configuration Management in JavaScript
Easy
2
63.3% Acceptance
In this lab, you will create a simple configuration management system in JavaScript. Your task is to create a config.json
file and a readConfig
function in index.js
. You will use the default Node.js 14 ESM syntax to accomplish the tasks.
The configuration management system should:
- Create a JSON file with readable format and parse it within the
index.js
module. - Access the data stored in the JSON configuration file using the
readConfig
function. - Export the
readConfig
function from theindex.js
for usage elsewhere in the application.