Skip to content

Instantly share code, notes, and snippets.

View CaptainYarb's full-sized avatar
🎮
Creating Multiplayer Servers

Jonathan Yarbor CaptainYarb

🎮
Creating Multiplayer Servers
View GitHub Profile
files = {
2:{
filename:"somefile.zip",
size:1200,
daysOld:2
},7:{
filename:"someother.zip",
size:1200,
daysOld:7
},21:{
@CaptainYarb
CaptainYarb / module.js
Created February 9, 2014 04:15
Node.js Module with Events Boilerplate
// setup event management
module.exports = function(){ return new Game(); }
var events = require('events'), util = require('util');
function Game(){ events.EventEmitter.call(this); }
util.inherits(Game, events.EventEmitter);
Game.prototype.start = function(){
// called when start is issued