Mercurial > pumpbridge
view src/app.coffee @ 11:9d17cb5147ca
back to fql, added fb user_friends permission
author | Mathias Gebbe <mgebbe@intevation.de> |
---|---|
date | Thu, 12 Jun 2014 01:08:00 +0200 |
parents | 98a070c98982 |
children | 6b3f38af3fa4 |
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; # and comes with NO WARRANTY! # See the documentation coming with pumpbridge for details. async = require 'async' databank = require 'databank' Databank = databank.Databank DatabankObject = databank.DatabankObject PumpIOClientApp = require 'pump.io-client-app' Sync = require('./sync') Config = require('./config') routes = require('./routes') config = Config.config async.waterfall [ (callback) -> # sets up the config app = new PumpIOClientApp(config) routes.addRoutes app # Start the app app.log.debug port: config.port address: config.address , 'Starting app listener' app.run (err) -> if err app.log.error err else console.log 'Express server is listening on address %s port %d', config.address, config.port # Start Deamon! Sync.sync() #app.get '/hello', (req, res) -> # res.send 'Hello, Zaiste!' return ], (err, result) ->