Here is the source documentation for process.argv
.
But what if my arguments are stored in a .json file instead of input individually at the command line. Is there a way to also access them using node.js?
data.json{
"foo": "bar",
"baz": "bat"
}
I want to load data.json as arguments somehow into my .js file that I also have stored locally on my computer. Then run it.
app.jsvar foo = "bar",
baz = "bat"; // Somehow, I need to import these arguments from data.json
// Then do stuff with them...