UNPKG

greenhorn

Version:

A simple server that renders HTML using various engines and a configuration file with test data

17 lines (12 loc) 296 B
var getStreamJSON = require('./get-stream-json'); var fs = require('fs'); var once = require('once'); module.exports = getLocalConfig; function getLocalConfig(path, cb) { var r = fs.createReadStream(path); cb = once(cb); r.on('error', function (e) { cb(e); }); getStreamJSON(r, cb); }