0.1.0 • Published 8 years ago
http-both v0.1.0
HTTP-BOTH
Creates a node server that will listen for both http and https requests.
Installation
Npm
npm install http-both
Example
var both = require('http-both');
var options = {
key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
};
// Server will handle http and https requests.
both.createServer(options, function (req, res) {
res.writeHead(200);
res.end("hello world\n");
}).listen(80);
Contributions
- Use gulp to run tests.
Please feel free to create a PR!
0.1.0
8 years ago