comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:b73191efc65b
1 # Copyright (C) 2014 by Intevation GmbH
2 # Author: Mathias Gebbe <mgebbe@intevation.de>
3 #
4 # This file is Free Software under the Apache License, Version 2.0
5 # (the "License"); and comes with ABSOLUTELY NO WARRANTY!
6 # You may not use this file except in compliance with the License.
7 # See LICENSE for details.
8
9 fs = require 'fs'
10 path = require 'path'
11 _ = require("underscore")
12
13 filename = '/etc/pumpbridge.json'
14
15 defaults =
16 name: 'pumpbridge'
17 description: 'bridge it'
18 forwardInterval: 15 * 60 * 1000
19 updateInterval: 12 * 60 * 60 * 1000
20 params: {}
21 views: path.join(__dirname, '..', 'views')
22 static: path.join(__dirname, '..', 'public')
23 foreign: 'pumpbridge'
24 foreignName: null
25
26 if fs.existsSync(filename)
27 config = _.defaults(JSON.parse(fs.readFileSync(filename)), defaults)
28 else
29 config = defaults
30
31 exports.config = config
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)