The code below will throw an error If port 9999 is already in use:
websocketIO = require '
websocket.io'
server = websocketIO.listen(9999);
Instead of breaking the execution of the script, is there a way to
provide a fallback? E.g. if port 9999 is already in use, check port
9998 instead.
I have already tried wrapping the code above with try/catch statements
without success.