Skip to content
Browse files

Adding basic archetecture

  • Loading branch information...
1 parent b597543 commit 5c55f9e15096c80b388590c1f1c88ca295e97cb7 David committed Dec 21, 2011
Showing with 20 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +7 −0 bin/subway
  3. +12 −0 lib/subway.js
View
1 .gitignore
@@ -0,0 +1 @@
+node_modules/
View
7 bin/subway
@@ -0,0 +1,7 @@
+#!/usr/bin/env node
+
+var Subway = require('../lib/subway').Subway;
+
+var subway = new Subway();
+
+subway.start();
View
12 lib/subway.js
@@ -0,0 +1,12 @@
+var irc = require('irc');
+var io = require('socket.io').listen(5555);
+
+var Subway = exports.Subway = function() {
+ var self = this;
+ self.io = io;
+ self.irc = irc;
+}
+
+Subway.prototype.start = function () {
+ var self = this;
+}
@akavlie
akavlie added a note Dec 22, 2011

What does the use of a prototype buy us here?

Also, why use var self = this rather than this directly?

@thedjpetersen
Owner

I don't think it really provides anything, just its holdover practice I started using from working on the hook.io project.

It is just a contextual helper, but I don't think its really necessary in this situation.

@akavlie
akavlie added a note Dec 22, 2011
@thedjpetersen
Owner

I don't work for nodejitsu, I was just working on it(can't say contributing, since I haven't contributed any lines of code, just wiki pages) for fun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

0 comments on commit 5c55f9e

Please sign in to comment.
Something went wrong with that request. Please try again.