mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-05-24 13:59:27 +08:00
10 lines
258 B
JavaScript
10 lines
258 B
JavaScript
var CONFIG_PATH = './config/'
|
|
, fs = require('fs')
|
|
, cache = {};
|
|
|
|
exports.load = function(path) {
|
|
var data = fs.readFileSync(CONFIG_PATH + (path || (path = 'app.json')))
|
|
, json = cache[path] || (cache[path] = JSON.parse(data));
|
|
|
|
return json;
|
|
}; |