Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fs = require('fs')
- class CoreConfiguration
- _instance = undefined
- @get: () ->
- _instance ?= new _CoreConfiguration
- class _CoreConfiguration
- constructor: () ->
- json = fs.readFileSync(process.cwd() + '/Configuration/' + process.env.NODE_ENV + '.json')
- try @config = JSON.parse(json)
- catch error
- console.log('There has been an error parsing your configuration JSON.' + error)
- process.exit 1
- return @config
- module.exports = CoreConfiguration
Add Comment
Please, Sign In to add comment