Commit ff9c882cd362bfcc66914ccbb88db29b8a32e0b5

Authored by Adhidarma Hadiwinoto
1 parent b94092187d
Exists in master

config.js

Showing 1 changed file with 16 additions and 0 deletions Side-by-side Diff

... ... @@ -0,0 +1,16 @@
  1 +"use strict";
  2 +
  3 +const fs = require('fs');
  4 +
  5 +let configFile = "../../config.json";
  6 +
  7 +if (!fs.existsSync(configFile)) {
  8 + console.trace('Config file not found. Terminating');
  9 + setImmedate(function() {
  10 + process.exit(1);
  11 + });
  12 +}
  13 +
  14 +const config = require(configFile);
  15 +
  16 +module.exports = config;