Permalink
Browse files

Add shebang for execution of server.js & bin to package.json

  • Loading branch information...
1 parent 6a52a67 commit 15638273c79d86d7de21ed4eb853462e8436be39 @akavlie committed Dec 1, 2011
Showing with 8 additions and 2 deletions.
  1. +3 −0 package.json
  2. +1 −0 public/app.js
  3. +4 −2 server.js
View
@@ -8,6 +8,9 @@
"irc": "0.3.x",
"socket.io": "0.8.x"
},
+ "bin": {
+ "web-irc": "./server.js"
+ },
"devDependencies": {
},
"engine": "node >= 0.4.x"
View
@@ -552,6 +552,7 @@ $(function() {
// Nick change event
socket.on('nick', function(data) {
// Update my info, if it's me
+ console.log('Nick change', data);
if (data.oldNick == irc.me.get('nick')) {
irc.me.set({nick: data.newNick});
}
View
6 server.js 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env node
+
var express = require('express'),
app = express.createServer(),
io = require('socket.io').listen(app),
@@ -20,7 +22,7 @@ app.get('/', function(req, res, next) {
next();
});
-console.log('Express server started on port %s', app.address().port);
+console.log('web-irc started on port %s', app.address().port);
// Socket.IO
@@ -73,4 +75,4 @@ io.sockets.on('connection', function(socket) {
for (var event in events) { activateListener(event, events[event]); }
console.log('Starting IRC client; wiring up socket events.')
});
-});
+});

0 comments on commit 1563827

Please sign in to comment.