I have this JSON config:
{
"searchRoot": ["HOME"],
"list": []
}
if I did this with JavaScript, I would do:
module.exports = {
searchRoots": [process.env.HOME],
list: []
};
the problem with using JSON instead of JS, is that I cannot programmatically reference environment variables or any variables really, everything is hardcoded.
What is the best way to include some sort of variable in JSON that can be interpreted by the reader of the file?
via Alexander Mills
No comments:
Post a Comment