Simple Config File Locator
NodeJS
Medium
3 views
Problem Description
Pick config path: MEETCODE_CONFIG env else ./meetcode.config.json.
Output Format
Print path.
Constraints
No file reading required.
Official Solution
const path = require('path');
const p = process.env.MEETCODE_CONFIG
? path.resolve(process.env.MEETCODE_CONFIG)
: path.resolve('meetcode.config.json');
console.log(p);
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!