Skip to content
New issue

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

Deprecated 'port' config is needed #17

Closed
idanielsteven opened this issue Aug 18, 2016 · 2 comments
Closed

Deprecated 'port' config is needed #17

idanielsteven opened this issue Aug 18, 2016 · 2 comments
Labels

Comments

@idanielsteven
Copy link

idanielsteven commented Aug 18, 2016

PORT config is needed especially when running two servers in the same container. Port conflicts occur otherwise.

NodeJS 4.4.7 on Ubuntu Trusty/64-140.4

Error: listen EADDRINUSE :::41338
at Object.exports._errnoException (util.js:907:11)
at exports._exceptionWithHostPort (util.js:930:20)
at Server._listen2 (net.js:1250:14)
at listen (net.js:1286:10)
at Server.listen (net.js:1382:5)

@RafalWilinski
Copy link
Owner

Are you using latest, 0.0.9 version?

If yes, then socket.io should bind to Express exposed port and you should be easily able to run two servers on one host.

For instance,

app.listen(3000, () => console.log('Server started on port 3000, Socket.io also'));

Second server:

app.listen(3001, () => console.log('Server started on port 3001, Socket.io also'));

@idanielsteven
Copy link
Author

I was on 0.0.6 from yesterdays install. Tried 0.0.9 and it seems to work fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants