Mercurial > pumpbridge
view src/config.coffee @ 0:b73191efc65b
Initial import of pumpbridge (bloody bloody alpha)
author | Mathias Gebbe <mgebbe@intevation.de> |
---|---|
date | Thu, 05 Jun 2014 10:35:15 +0200 |
parents | |
children | 98a070c98982 |
line wrap: on
line source
# Copyright (C) 2014 by Intevation GmbH # Author: Mathias Gebbe <mgebbe@intevation.de> # # This file is Free Software under the Apache License, Version 2.0 # (the "License"); and comes with ABSOLUTELY NO WARRANTY! # You may not use this file except in compliance with the License. # See LICENSE for details. fs = require 'fs' path = require 'path' _ = require("underscore") filename = '/etc/pumpbridge.json' defaults = name: 'pumpbridge' description: 'bridge it' forwardInterval: 15 * 60 * 1000 updateInterval: 12 * 60 * 60 * 1000 params: {} views: path.join(__dirname, '..', 'views') static: path.join(__dirname, '..', 'public') foreign: 'pumpbridge' foreignName: null if fs.existsSync(filename) config = _.defaults(JSON.parse(fs.readFileSync(filename)), defaults) else config = defaults exports.config = config