Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Version 0.2.0

- update dependencies
- improve package.json metadata
- emit message to all users for incoming users
- move api.on refresh outside io.sockets block - should solve #14 #15
  • Loading branch information...
commit 7a7a9db20d27c9d91db429f1163acf50106ddcd2 1 parent 1043df5
@obazoud obazoud authored
Showing with 37 additions and 17 deletions.
  1. +32 −13 package.json
  2. +5 −4 server.js
View
45 package.json
@@ -1,22 +1,41 @@
{
"name": "statusdashboard",
- "version": "0.1.0",
- "author": "obazoud",
+ "version": "0.2.0",
+ "description": "A services status dashboard",
+ "author": "Olivier Bazoud <olivier.bazoud@gmail.com>",
+ "homepage": "http://github.com/obazoud/statusdashboard.git",
+ "keywords": [
+ "node"
+ ],
+ "maintainers": [{
+ "name": "Olivier Bazoud",
+ "email": "olivier.bazoud@gmail.com"
+ }],
+ "contributors": [],
+ "licenses": [{
+ "type": "MIT",
+ "url": "http://mths.be/mit"
+ }],
+ "bugs": {
+ "url": "https://github.com/obazoud/statusdashboard/issues"
+ },
"repository": {
"type": "git",
"url": "http://github.com/obazoud/statusdashboard.git"
},
"main": "server.js",
- "dependencies": {
- "socket.io": "0.8.5",
- "paperboy": "0.0.2",
- "journey": "0.4.0-pre-3",
- "underscore": "1.1.6",
- "irc": "0.2.0",
- "twitter": "0.1.17",
- "redis": "0.7.1",
- "hiredis": "0.1.13",
- "nodemailer": "0.1.22"
+ "engines": {
+ "node": "0.4.x"
},
- "engine": "node 0.4.8"
+ "dependencies": {
+ "socket.io": "0.9.2",
+ "paperboy": "0.0.3",
+ "journey": "0.4.0-pre-3",
+ "underscore": "1.3.1",
+ "irc": "0.3.3",
+ "twitter": "0.1.18",
+ "redis": "0.7.1",
+ "hiredis": "0.1.14",
+ "nodemailer": "0.1.22"
+ }
}
View
9 server.js
@@ -79,16 +79,17 @@ io.sockets.on('connection', function(socket) {
util.log('New client connected! (' + count + ')');
socket.emit('title', settings.title);
socket.emit('status', api.getStatus());
- socket.broadcast.emit('count', count);
+ io.sockets.emit('count', count);
socket.on('disconnect', function() {
count--;
util.log('Client disconnect! (' + count + ')');
socket.broadcast.emit('count', count);
});
- api.on("refresh", function(status) {
- socket.emit('status', status);
- });
+});
+
+api.on("refresh", function(status) {
+ io.sockets.emit('status', status);
});
api.on("routeContribution", function(route) {
Please sign in to comment.
Something went wrong with that request. Please try again.