Last active
February 26, 2017 16:50
-
-
Save mynameislau/920e9743213bf5b23addef9455ac635b to your computer and use it in GitHub Desktop.
Get automatically a free port on Express
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const listener = app.listen(0, () => { | |
console.log(`Listening to port ${listener.address().port}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment