You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/usr/bin/env node
if (process.env.NODE_ENV !== 'production') {
if (!require('piping')({
hook: true,
ignore: /(\/\.|~$|\.json$)/i
})) {
return;
}
}
var express = require('express');
var http = require('http');
var app = express();
app.server = http.createServer(app);
app.server.listen(process.env.PORT || 8080);
console.log('Started on port' + app.server.address().port);
For some odd reason, when running this simple app with piping, app.server.address() returns null.
If I run this code without piping, it returns the port as expected.
Using "express": "^4.13.4" and "piping": "^0.3.0",
Any ideas?
The text was updated successfully, but these errors were encountered:
I'm having the same issue. I had to replace piping with nodemon for tests to work (using mocha). This issue was not apparent until I tried testing an express server with supertest, as supertest makes heavy use of app.server.address().
I have my piping code setup as such:
For some odd reason, when running this simple app with piping,
app.server.address()
returns null.If I run this code without piping, it returns the port as expected.
Using
"express": "^4.13.4"
and"piping": "^0.3.0",
Any ideas?
The text was updated successfully, but these errors were encountered: