question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should app.listen also return a promise?

See original GitHub issue

https://github.com/koajs/koa/blob/master/lib/application.js#L62 currently returning server.listen(), thoughts?

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jonathanongcommented, Sep 1, 2013

What would that accomplish?

0reactions
tjcommented, Sep 1, 2013

I find it useful, just need to be certain that it’s not going to change and turn into some giant wtf

Read more comments on GitHub >

github_iconTop Results From Across the Web

Express app.listen returns Promise { Server {} } - Stack Overflow
I have a startup function that connects to database, then returns a Server with app.listen(). The issue is that if I return app.listen...
Read more >
Express.js | app.listen() Function - GeeksforGeeks
The app.listen() function is used to bind and listen the connections on the specified host and port. This method is identical to Node's...
Read more >
Using Express.js Routes for Promise-based Error Handling
Finally, we specify what to do if no route is found, and how to handle errors, which we will change later. The script...
Read more >
Using async/await in Express.js - Ioannis Ioannou
Given that func is wrapped using Promise.resolve() , the asyncHandler can also be used with non async functions. Complete Example. const ...
Read more >
Supporting Promises in Express Middleware - Mastering JS
In order to make sure your Express app doesn't hang forever, you need to make sure your middleware functions call next() and your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found