Skip to content

Instantly share code, notes, and snippets.

@mrwillihog
Created February 1, 2014 21:49
Show Gist options
  • Save mrwillihog/8759452 to your computer and use it in GitHub Desktop.
Save mrwillihog/8759452 to your computer and use it in GitHub Desktop.
// base.js
var redis = require('redis').createClient();
function Base() {}
Base.find = function() {}
Base.where = function () {}
module.exports = function () {}
// episode.js
var Base = require('./base');
function Episode() {}
Episode.prototype.__proto__ = Base.prototype
// programme.js
var Base = require('./base');
function Programme() {}
Programme.prototype.__proto__ = Base.prototype
// index.js
var Episode = require('./lib/episode'),
Programme = require('./lib/programme');
module.exports = {
Episode: new Episode(),
Programme: new Programme()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment