Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

Commit

Permalink
fix require() of system modules
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlamsl committed Sep 27, 2013
1 parent 435bf55 commit 544de40
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,19 @@ var run = module.exports = function(main) {
if (module.app) {
var httpserver = require('./httpserver');
if (!httpserver.started) {
httpserver.main(module.app, argv[2], {cluster: argv[3]});
httpserver.main(module.app, argv[2], {cluster:argv[3]});
}
}
}
});
} else {
var system = require('./system');
require = function(name) {
return proto.require.call(this, path.resolve(process.cwd(), name));
try {
return proto.require.call(this, name);
} catch (e) {
return protoRequire.call(this, path.resolve(process.cwd(), name));
}
};
var line;
spawn(function() {
Expand Down

0 comments on commit 544de40

Please sign in to comment.