From c1bd3f2c902f27bf3891afea0fdc4724c6ed5361 Mon Sep 17 00:00:00 2001 From: danbulant Date: Wed, 19 Feb 2020 20:27:37 +0100 Subject: [PATCH] Simple config reader --- modules/config.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 modules/config.js diff --git a/modules/config.js b/modules/config.js new file mode 100644 index 0000000..a5fe586 --- /dev/null +++ b/modules/config.js @@ -0,0 +1,7 @@ +const fs = require("fs"); + +module.exports = ()=>{ + if(!global.config) + global.config = JSON.parse(fs.readFileSync(__dirname + "/../packages/config.json")); + return global.config; +} \ No newline at end of file