Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supporting namespace #145

Open
arily opened this issue May 7, 2020 · 0 comments · May be fixed by #191
Open

supporting namespace #145

arily opened this issue May 7, 2020 · 0 comments · May be fixed by #191

Comments

@arily
Copy link

arily commented May 7, 2020

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'),
}));
@lamweili lamweili linked a pull request Jun 9, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant