I like to create a nodejs cli program that allow me to create a simple json configuration file.
This configuration file will have the definition of the Application.
{
"SiteName": "My NodeJS Site",
"Look and Feel": {
"Theme": "Business 1",
"Skin": "Blue",
"Layout": "1H-3C-1F"
},
"Pages": {
"Home": {
"Region-1": {
"Acitve": "Yes"
},
"Region-2": {
"Active": "Yes"
},
"Region-3": {
"Active": "No"
}
},
"Products": {
"Region-1": {
"Acitve": "Yes"
},
"Region-2": {
"Active": "No"
},
"Region-3": {
"Active": "No"
}
},
"Services": {
"Region-1": {
"Acitve": "Yes"
},
"Region-2": {
"Active": "Yes"
}
},
"About Us": {
"Region-1": {
"Acitve": "Yes"
},
"Region-2": {
"Active": "No"
}
}
}
}
So basically, Like to have a cli program able to read the file and let me setup the configuration of the site, add ages, configure regions just like if I'm setting up objects and at the end save everything in a json format with later will be used to generate all the site.
The regions will be feed data from another file where the text file can be stored or a reference to a dynamic List from a datase is called, perhaps some XML object /map or third party plugin.
What would be the best recommendation to achieve this ?