nodejs / help

:sparkles: Need help with Node.js? File an Issue here. :rocket:
1.45k stars 278 forks source link

await http.Server.listen(...) #4275

Closed Lucyfurnice closed 8 months ago

Lucyfurnice commented 8 months ago

Details

app.listen happens after process.exit

I would like process exit to happen after the koa app.listen(...) -> http.Server.listen(...) -> net.Server.listen(...) code segment that makes the console listen for ctrl+c.

Node.js version

v18.18.2

Example code

A project here: koa-test An issue here: koajs/koa A suggestion to make a change here: application.js#17, and here: main.js#11 A ES6 test here: ES6-test a single file test: single-file

Operating system

Microsoft Windows [Version 10.0.22621.2428]

Scope

runtime?

Module and version

( net.js@18.18.2 setupListenHandle(...)) & net.js@18.18.2 Server.prototype.listen = function(...args) )

"dependencies": { "koa": "^2.14.2" }