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
/** | |
* Nifty function that generates a callback that cannot be executed synchronously | |
* This is useful to circumvent the behaviour of crappy libraries that are not always async | |
* (e.g. if they cache certain results) | |
*/ | |
exports.callAsync = function(original_callback) { | |
// capture scope | |
var self = this; | |
return function() { | |
var args = arguments; |
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
// curl -k https://localhost:8000/ | |
var https = require('https'); | |
var fs = require('fs'); | |
var options = { | |
key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), | |
cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') | |
}; | |
https.createServer(options, function (req, res) { |