The following example:
```js
const io = new Server(); // without port or HTTP server
instrument(io, {
auth: false
});
io.listen(3000);
```
will now work properly.
Related: https://github.com/socketio/socket.io-admin-ui/issues/49
There are two ways to enable this production mode:
- either with the new "mode" option:
```js
instrument(io, {
mode: "production" // defaults to "development"
});
```
- or with the NODE_ENV environment variable:
```
NODE_ENV=production node index.js
```
In production mode, the server won't send all details about the socket
instances and the rooms, thus reducing the memory footprint of the
instrumentation.
Related:
- https://github.com/socketio/socket.io-admin-ui/issues/22
- https://github.com/socketio/socket.io-admin-ui/issues/23