This was a setting under admin>settings>sockets it has been moved to config.json.
Old name was websocketAddress now its just address under the socket.io object.
"address": "", //or url to socket.io server
"transports": ["websocket", "polling"]
Relevant commit: https://github.com/NodeBB/NodeBB/commit/14e46a87a63f5e983a58a73109710027297924f3
The reason is if you put a invalid value here sockets will not connect and since the admin page uses sockets to save settings you can't change it back.