Permalink
Browse files

Merge pull request #624 from mojit0/develop

Fix broken Manhattan server.js format to allow:

process.chdir(__dirname);

module.exports = function(config, token) {
   var Mojito = require('mojito');
   var app = Mojito.createServer();

   process.emit("application-ready", token, app.getHttpServer());
};
  • Loading branch information...
2 parents fac46b0 + a41580f commit fe3a6518b674b18a3b2fa8f18220abe6bef74f92 @mojit0 mojit0 committed Oct 12, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/mojito.js
View
@@ -456,6 +456,15 @@ MojitoServer.prototype.close = function() {
/**
+ * Returns the instance of http.Server (or a subtype) which is the true server.
+ * @return {http.Server} The node.js http.Server (or subtype) instance.
+ */
+MojitoServer.prototype.getHttpServer = function() {
+ return this._app;
+};
+
+
+/**
* Invokes a callback function with the content of the requested url.
* @param {string} url A url to fetch.
* @param {{host: string, port: number, method: string}|function} opts A list of

0 comments on commit fe3a651

Please sign in to comment.