create-server
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -119,3 +119,3 @@ 'use strict'; | ||
['request', 'upgrade', 'error'].forEach(function each(event) { | ||
if (fn[event]) server.on('request', fn[event]); | ||
if (fn[event]) server.on(event, fn[event]); | ||
}); | ||
@@ -122,0 +122,0 @@ |
{ | ||
"name": "create-server", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Create a pre-configured HTTP server", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -63,2 +63,29 @@ describe('create server', function () { | ||
}); | ||
it('creates a HTTPS server when given certs', function (next) { | ||
server = create({ | ||
port: ++port, | ||
root: __dirname, | ||
cert: './ssl/server.crt', | ||
key: './ssl/server.key', | ||
listening: next | ||
}); | ||
assume(server).to.be.instanceOf(https.Server); | ||
}); | ||
it('creates a SPDY server when given the SPDY boolean', function (next) { | ||
server = create({ | ||
port: ++port, | ||
root: __dirname, | ||
cert: './ssl/server.crt', | ||
key: './ssl/server.key', | ||
spdy: true, | ||
listening: next | ||
}); | ||
// spdy is spiced up HTTPS server | ||
assume(server).to.be.instanceOf(https.Server); | ||
assume(server).to.be.instanceOf(spdy.server.Server); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10794
9
208