22 lines
641 B
CoffeeScript
22 lines
641 B
CoffeeScript
config = require("./config")
|
|
Hook = require("./hook")
|
|
IDMapping = require("./id_mapping")
|
|
WebHooks = require("./web_hooks")
|
|
WebServer = require("./web_server")
|
|
|
|
# Class that defines the application. Listens for events on redis and starts the
|
|
# process to perform the callback calls.
|
|
# TODO: add port (-p) and log level (-l) to the command line args
|
|
module.exports = class Application
|
|
|
|
constructor: ->
|
|
@webHooks = new WebHooks()
|
|
@webServer = new WebServer()
|
|
|
|
start: ->
|
|
Hook.initialize =>
|
|
IDMapping.initialize =>
|
|
@webServer.start(config.server.port)
|
|
@webServer.createPermanent()
|
|
@webHooks.start()
|