This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loadModule REQUEST path parent: ../common | |
load native module path | |
loadModule REQUEST assert parent: ../common | |
load native module assert | |
loadModule REQUEST util parent: ../common | |
load native module util | |
loadModule REQUEST path parent: . | |
load native module path | |
loadModule REQUEST net parent: . | |
load native module net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
closed 100 | |
closed 103 | |
closed 99 | |
node.js:58 | |
throw e; // process.nextTick error, or 'error' event on first tick | |
^ | |
AssertionError: 99 was one of the first closed connections but shouldnt have been | |
at Stream.<anonymous> (/home/aconbere/Projects/javascript/node/test/simple/test-net-server-max-connections.js:54:16) | |
at Stream.emit (events.js:31:17) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// needs to handle the following cases | |
// | |
// require("a.<ext>") | |
// -> a.<ext> | |
// | |
// require("a") | |
// -> a | |
// -> a.<ext> | |
// -> a/index.<ext> | |
function findModulePath (request, paths) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// needs to handle the following cases | |
// | |
// require("a.<ext>") | |
// -> a.<ext> | |
// | |
// require("a") | |
// -> a | |
// -> a.<ext> | |
// -> a/index.<ext> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// needs to handle the following cases | |
// | |
// require("a.<ext>") | |
// -> a.<ext> | |
// | |
// require("a") | |
// -> a | |
// -> a.<ext> | |
// -> a/index.<ext> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// needs to handle the following cases | |
// | |
// require("a.<ext>") | |
// -> a.<ext> | |
// | |
// require("a") | |
// -> a | |
// -> a.<ext> | |
// -> a/index.<ext> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Which files to traverse while finding id? Returns generator function. | |
function traverser (id, dirs) { | |
var head = [], | |
inDir = [], | |
dirs = dirs.slice(), // a copy of the original array | |
exts = Object.keys(extensions); | |
return function next () { | |
var result = head.shift(); | |
if (result) { return result; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require("fs"); | |
var path = require("path"); | |
var handleReadDirFactory = function (start, callback) { | |
var handleReadDir = function (err, files) { | |
if (err) return callback(err) | |
var dirs = [] | |
, notDirs = [] | |
, IL = files.length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require("fs"); | |
var path = require("path"); | |
var walk = function (start, callback) { | |
fs.lstat(start, function (err, stat) { | |
if (err) return callback(err) | |
if (stat.isDirectory() && !stat.isSymbolicLink()) { | |
fs.readdir(start, function (err, files) { | |
if (err) return callback(err) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------- | |
/ \ | |
/ REST \ | |
/ IN \ | |
/ PEACE \ | |
/ \ | |
| aconbere | | |
| 897 Au | | |
| killed by a | | |
| giant bat | |