You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's possible to have more than one project using livereload and running at the same time.
It would be nice to allow OS to dynamically randomly generate ports on server creation.
So the following code should not create a server on the default port 35729 but on some random one:
server.listen(0,function(){ ... });
The text was updated successfully, but these errors were encountered:
Currently the strategy is to leave that sort of behavior up to the user. Check out https://www.npmjs.com/package/openport It's a pretty nice library for finding an open port.
Openport is a good but redundant solution.
This library will try to create a net server and if fail try some other port till server is created successfully. Then is close this server. So eventually you will have some port. But why so much efforts? Just specify zero port and operating system itself provides an available port. No need to use hacks, probe any ports, to waist time and resources.
It's possible to have more than one project using livereload and running at the same time.
It would be nice to allow OS to dynamically randomly generate ports on server creation.
So the following code should not create a server on the default port 35729 but on some random one:
The text was updated successfully, but these errors were encountered: