Browse Source

bump `get-port`

http2
Sindre Sorhus 9 years ago
parent
commit
32d9077a76
  1. 2
      package.json
  2. 5
      test/_server.js

2
package.json

@ -63,7 +63,7 @@
"devDependencies": {
"ava": "^0.3.0",
"coveralls": "^2.11.4",
"get-port": "^1.0.0",
"get-port": "^2.0.0",
"into-stream": "^2.0.0",
"nyc": "^3.2.2",
"pem": "^1.4.4",

5
test/_server.js

@ -3,11 +3,10 @@ var http = require('http');
var https = require('https');
var pify = require('pify');
var getPort = require('get-port');
var getPortP = pify(getPort);
var host = exports.host = 'localhost';
exports.createServer = function () {
return getPortP().then(function (port) {
return getPort().then(function (port) {
var s = http.createServer(function (req, resp) {
s.emit(req.url, req, resp);
});
@ -25,7 +24,7 @@ exports.createServer = function () {
};
exports.createSSLServer = function (opts) {
return getPortP().then(function (port) {
return getPort().then(function (port) {
var s = https.createServer(opts, function (req, resp) {
s.emit(req.url, req, resp);
});

Loading…
Cancel
Save