Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

Commit

Permalink
Removed domains altogether.
Browse files Browse the repository at this point in the history
  • Loading branch information
pluma committed Dec 30, 2013
1 parent 519c291 commit 159da47
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -2,3 +2,4 @@ language: node_js
node_js:
- "0.10"
- "0.8"
- "0.6"
11 changes: 5 additions & 6 deletions index.js
@@ -1,7 +1,6 @@
/*! routes-http 0.1.0 Copyright (c) 2013 Alan Plum. MIT licensed. @preserve */
var httperr = require('httperr');
var router = require('routes');
var domain = require('domain');
var parseUrl = require('url').parse;

module.exports = function() {
Expand All @@ -28,11 +27,11 @@ module.exports = function() {
opts = undefined;
}
if (handleError) {
var d = domain.create();
d.on('error', handleError);
d.run(function() {
process.nextTick(d.bind(runRoute));
});
try {
runRoute();
} catch(err) {
handleError(err);
}
} else {
runRoute();
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -31,6 +31,6 @@
"test": "make test"
},
"engines": {
"node": ">=0.8"
"node": ">=0.6"
}
}

0 comments on commit 159da47

Please sign in to comment.