2014-05-02 05:42:15 +08:00
|
|
|
Hapi = require 'hapi'
|
|
|
|
pack = require './package'
|
|
|
|
|
2014-05-02 22:44:45 +08:00
|
|
|
log = require './lib/logger'
|
|
|
|
recWatcher = require './lib/recording-dir-watcher'
|
|
|
|
routes = require './lib/routes'
|
2014-05-02 05:42:15 +08:00
|
|
|
|
|
|
|
server = Hapi.createServer("0.0.0.0",
|
|
|
|
parseInt(process.env.PORT, 10) or 4000)
|
2014-05-01 23:30:09 +08:00
|
|
|
|
|
|
|
server.start(() ->
|
2014-05-02 05:42:15 +08:00
|
|
|
log.info(['start'], pack.name + ' - web interface: ' + server.info.uri)
|
2014-05-01 23:30:09 +08:00
|
|
|
)
|
|
|
|
|
2014-05-02 05:42:15 +08:00
|
|
|
server.route(routes.routes)
|