This file contains hidden or 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 bouncy = require('bouncy'); | |
| module.exports = function(evn) { | |
| bouncy(function(req, bounce) { | |
| try { | |
| if(evn.domains.hasOwnProperty(req.headers.host)) { | |
| bounce(evn.domains[req.headers.host].port); | |
| } else if(evn.cdn.hosts.hasOwnProperty(req.headers.host)) { | |
| bounce(evn.cdn.hosts[req.headers.host].port); |
This file contains hidden or 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
| events.js:45 | |
| throw arguments[1]; // Unhandled 'error' event | |
| ^ | |
| Error: error parsing url | |
| at Parser.execute (/home/joe/Devel/node_modules/bouncy/node_modules/parsley/index.js:24:27) | |
| at Socket.<anonymous> (/home/joe/Devel/node_modules/bouncy/node_modules/parsley/index.js:11:14) | |
| at Socket.emit (events.js:64:17) | |
| at Socket._onReadable (net.js:672:14) | |
| at IOWatcher.onReadable [as callback] (net.js:177:10) |
This file contains hidden or 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
| Downloader.prototype.download = function() { | |
| if(this.quota.length >= 1 && !this.isDownloading) { | |
| this.isDownloading = true; | |
| var id = this.quota.shift(); | |
| var httpClient = http.createClient(this.port, this.host); | |
| var request = httpClient.request('GET', '/download/' + this.key + '/' + id, { |
This file contains hidden or 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 rpc = module.exports = function() { | |
| events.EventEmitter.call(this); | |
| var self = this; | |
| this.counter = 0; | |
| this.functions = {}; | |
| this.promises = {}; | |
| this.id | |
| this.slaves = {} |
This file contains hidden or 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
| console.log('router start') | |
| var inherits = function(ctor, superCtor) { | |
| ctor.super_ = superCtor; | |
| ctor.prototype = Object.create(superCtor.prototype, { | |
| constructor : { | |
| value : ctor, | |
| enumerable : false, | |
| writable : true, | |
| configurable : true | |
| } |
This file contains hidden or 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 build = function(buildFn, name, html, callBack) { | |
| this.name = name; | |
| this.html = html; | |
| this.buildFn = buildFn; | |
| this.callBack = callBack; | |
| buildFn.apply(this, [this]) | |
| } | |
| build.prototype.render = function(name, callBack) { |
This file contains hidden or 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 express = require('express'); | |
| var app = module.exports = express.createServer(); | |
| app.configure(function() { | |
| app.use(express.bodyParser()); | |
| app.use(express.methodOverride()) | |
| app.use(app.router); |
This file contains hidden or 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 cluster = require('cluster') | |
| var express = require('express'); | |
| var app = express.createServer(); | |
| app.configure(function() { | |
| app.use(express.vhost('wiyc.info', require('./apps/wiyc.info/app'))); | |
| }) |
This file contains hidden or 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
| Connecting to localhost:27017 | |
| node.js:134 | |
| throw e; // process.nextTick error, or 'error' event on first tick | |
| ^ | |
| TypeError: Cannot call method 'dropDatabase' of null | |
| at /home/dev/node-mongodb-native/examples/simple.js:19:6 | |
| at /home/dev/node-mongodb-native/lib/mongodb/db.js:79:30 | |
| at [object Object].<anonymous> (/home/dev/node-mongodb-native/lib/mongodb/connections/server.js:113:12) | |
| at [object Object].emit (events.js:64:17) |
This file contains hidden or 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
| ../timestamp.cc:6:25:../long.cc:6:25: error: ../code.cc:6:25: ../dbref.cc:6:25: error: node_events.h: No such file or directorynode_events.h: No such file or directory | |
| error: node_events.h: No such file or directory | |
| error: | |
| node_events.h: No such file or directory | |
| ../bson.cc:7:25: error: node_events.h: No such file or directory | |
| ../binary.cc:7:25:../objectid.cc:6:25: error: error: node_events.h: No such file or directory | |
| node_events.h: No such file or directory | |
| ../long.cc:18: warning: this decimal constant is unsigned only in ISO C90 | |
| ../long.cc:19: warning: this decimal constant is unsigned only in ISO C90 | |
| ../bson.cc:43: warning: this decimal constant is unsigned only in ISO C90 |