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
I'm using p-Event like this:
const httpServer = await pEvent(server.koaApp.listen(config.server.port), 'listening')
The 'listening' event is triggering but the result in httpServer is undefined. What am I doing wrong?
'listening'
httpServer
undefined
The text was updated successfully, but these errors were encountered:
Also, does p-event have a way to handle situations where the emitter function also returns a value?
Sorry, something went wrong.
You might need to bind the .listen method to the koaApp instance:
.listen
koaApp
const httpServer = await pEvent(server.koaApp.listen.bind(server.koaApp, config.server.port), 'listening')
No, I have never seen an API like that, so I don't think it's common enough to support such a thing.
No branches or pull requests
I'm using p-Event like this:
The
'listening'
event is triggering but the result inhttpServer
isundefined
. What am I doing wrong?The text was updated successfully, but these errors were encountered: