vercel / micro

Asynchronous HTTP microservices
MIT License
10.59k stars 459 forks source link

Port binding is not working and multiple endpoint is broken #480

Open oklas opened 1 year ago

oklas commented 1 year ago

Typical usage like this:

tsx ./node_modules/.bin/micro -l tcp://localhost:3010 ./src/service/index.ts

is not working.

Error message:

micro: Accepting connections on port 3010
micro: Error: listen EADDRINUSE: address already in use localhost
    at __node_internal_captureLargerStackTrace (node:internal/errors:490:5)
    at __node_internal_uvExceptionWithHostPort (node:internal/errors:589:12)
    at Server.setupListenHandle [as _listen2] (node:net:1724:21)
    at listenInCluster (node:net:1789:12)
    at Server.listen (node:net:1888:5)
    at startEndpoint (/Users/oklas/sdm-queue/node_modules/micro/dist/src/bin/micro.js:123:12)
    at start (/Users/oklas/sdm-queue/node_modules/micro/dist/src/bin/micro.js:145:13)
micro: Gracefully shutting down. Please wait...
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.