Merge pull request #130 from jsheely/master
Support iisnode using named pipes as PORT value Close #130
This commit is contained in:
commit
083a1265a4
|
@ -115,7 +115,9 @@ function setPort(app, instructions) {
|
||||||
process.env.npm_package_config_port,
|
process.env.npm_package_config_port,
|
||||||
app.get('port'),
|
app.get('port'),
|
||||||
3000
|
3000
|
||||||
], isFinite);
|
], function(p) {
|
||||||
|
return p != null;
|
||||||
|
});
|
||||||
|
|
||||||
if (port !== undefined) {
|
if (port !== undefined) {
|
||||||
var portType = typeof port;
|
var portType = typeof port;
|
||||||
|
|
|
@ -417,10 +417,11 @@ describe('executor', function() {
|
||||||
assert.equal(app.get('port'), 3000);
|
assert.equal(app.get('port'), 3000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should ignore non-numeric port values in ENV', function() {
|
it('should respect named pipes port values in ENV', function() {
|
||||||
process.env.PORT = '123invalid';
|
var NAMED_PORT = '\\.\\pipe\\test';
|
||||||
|
process.env.PORT = NAMED_PORT;
|
||||||
boot.execute(app, someInstructions({ config: { port: 3000 } }));
|
boot.execute(app, someInstructions({ config: { port: 3000 } }));
|
||||||
assert.equal(app.get('port'), 3000);
|
assert.equal(app.get('port'), NAMED_PORT);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue