We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Say I initialize my swagger instance in a swaggers.js module as:
swaggers.js
const swagger = new ExpressJoiSwagger({ swaggerDefinition: {}, ... module.exports = swagger;
And then in my server file:
const swagger = require('./utils/swagger'); const app = express(); swaggerizedApp = swagger.wrapRouter(app); const httpServer = swaggerizedApp.listen(SERVER_PORT, () => { console.log('swagger joi enabled server listening on ...'); });
But httpServer is undefined. I need it to pass it on to a Socket.IO server. Is this a bug or am I doing something wrong?
httpServer
undefined
Edit: Yup, found the issue: https://github.com/richardgirges/express-joi-swagger/blob/master/src/index.js#L129
/** * Initiate express app.listen() and build the master swagger definition * @param {Object} expressRouter * @param {...any} args */ _listen(expressRouter, ...args) { this._buildSwaggerDefinition(expressRouter); expressRouter.listen(...args); /* <<<<<<< PROBLEM */ }
the express router listen call result isn't returned.
listen
The text was updated successfully, but these errors were encountered:
[fix]: Issue richardgirges#5 - ExpressJoiSwagger._listen doesn't retu…
5f019dc
…rn node http.Server
Merge pull request #6 from cmmash/fix/issue-5
f6262f7
[fix]: Issue #5 - ExpressJoiSwagger._listen doesn't return node http.Server
No branches or pull requests
Say I initialize my swagger instance in a
swaggers.js
module as:And then in my server file:
But
httpServer
isundefined
. I need it to pass it on to a Socket.IO server.Is this a bug or am I doing something wrong?
Edit: Yup, found the issue: https://github.com/richardgirges/express-joi-swagger/blob/master/src/index.js#L129
the express router
listen
call result isn't returned.The text was updated successfully, but these errors were encountered: