Skip to content

supporting namespace #145

@arily

Description

@arily

my project uses socketIO and uses default namespace,
so every client are constantly receiving status or I have to create another socket for the monitor.

instead of

const app = express();

const server = require('http').Server(app);
const io = require('socket.io')(server);

const statusSocket = require('socket.io')(server,{
    path: '/statusSocket'
});
app.use(require('express-status-monitor')({
    socketPath: '/statusSocket',
    websocket: statusSocket,
}));

it will be better to support custom namespace

const app = express();

const server = require('http').Server(app);
const io = require('socket.io')(server);
app.use(require('express-status-monitor')({
    namespace: '/status',
    websocket: io.of('/status'),
}));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions