webrtc-signaling-helpers
Version:
This is a helper package which is needed to be installed if webrtc-signaling-server is installed
21 lines (17 loc) • 547 B
JavaScript
// TechnicalHeist - www.technicalheist.com
// MIT License - https://github.com/technicalheist/webrtc-signaling-helpers/blob/master/LICENSE
// Documentation - https://github.com/technicalheist/webrtc-signaling-helpers
function getJsonFile(path) {
var fs = require('fs');
var output = {};
try {
var json = fs.readFileSync(path);
output = JSON.parse(json);
}
catch(e) {
output = {};
// console.log(e.message, e.stack);
}
return output;
}
module.exports = exports = getJsonFile;