From ec01f81f5f617ce55a1fe3480d72435d4e49783c Mon Sep 17 00:00:00 2001 From: Andrew Vayanis Date: Mon, 25 Mar 2013 02:12:50 -0700 Subject: [PATCH] Update Zzz module interface to be more similar to http.Server interface --- lib/z.js | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/lib/z.js b/lib/z.js index a8cedaf..46ff43f 100644 --- a/lib/z.js +++ b/lib/z.js @@ -1,27 +1,13 @@ /** * Zees Includes */ -var zeeServer = require("./server"); +var ZzzServer = require("./server"); -/** - * Globals - */ -var server; +module.exports = { -/** - * Wrap http createServer so that we can dynamically - * define requestHandler - * @return {http.Server} - */ -exports.createServer = function() { - server = new ZeeServer(); - return server; -}; + createServer : function() { + return new ZzzServer(); + }, -/** - * Provides interface to http.Server.listen - * @return {void} - */ -exports.listen = function() { - server.listen.apply(server, arguments); + Server : ZzzServer } \ No newline at end of file