Show default page

This commit is contained in:
Zalmoxisus
2016-01-21 12:12:47 +02:00
parent 56fda3de2c
commit f12bf148d0
3 changed files with 18 additions and 0 deletions

View File

@ -1,6 +1,13 @@
var express = require('express');
module.exports.run = function(worker) {
var app = require('express')();
var httpServer = worker.httpServer;
var scServer = worker.scServer;
httpServer.on('request', app);
app.use('/', require('./router'));
scServer.addMiddleware(scServer.MIDDLEWARE_EMIT, function (socket, channel, data, next) {
if (channel.substr(0, 3) === 'sc-' || channel === 'respond' || channel === 'log') {
scServer.exchange.publish(channel, data);