var express = require('express'); function OKServer(options) { if (!(this instanceof OKServer)) return new OKServer(options); options = options || {}; this._app = express(); } OKServer.prototype.addView = function addView(route, view) { console.log(route, view) this._app.use(route, view.middleware()); return this; }; OKServer.prototype.listen = function listen(port) { this._app.listen(port || 1337); return this; }; module.exports = OKServer;