Added indicator

This commit is contained in:
Mattias Erming 2014-07-17 08:21:47 -07:00
parent 760efd5ef0
commit c54dded706
2 changed files with 15 additions and 1 deletions

View File

@ -3,6 +3,7 @@ var Client = require("./client");
var config = require("../config") || {};
var fs = require("fs");
var http = require("connect");
var indicator = require("indicator");
var io = require("socket.io");
var sockets = null;
@ -26,7 +27,13 @@ var inputs = [
];
module.exports = function() {
sockets = io(http().use(index).use(http.static("client")).listen(config.port || 9000));
var port = config.port || 9000;
var app = http()
.use(index)
.use(http.static("client"))
.listen(port);
sockets = io(app);
sockets.on("connect", function(socket) {
if (config.public) {
auth.call(socket);
@ -34,6 +41,12 @@ module.exports = function() {
init(socket);
}
});
console.log("Shout started.");
indicator.start(
"Running on port "
+ port
);
};
function index(req, res, next) {

View File

@ -33,6 +33,7 @@
},
"dependencies": {
"connect": "~2.19.6",
"indicator": "~0.1.0",
"lodash": "~2.4.1",
"moment": "~2.7.0",
"slate-irc": "~0.6.0",