fix: gently log the port on which the realtime service listens (#21575)
* fix: gently log the port on which the realtime service listens without this, the service remains completely silent (e.g. in overmind) and it is hard to tell if it is even running * Revert "fix: gently log the port on which the realtime service listens" This reverts commit 14a21989c6767520d8e1b9d46cc9f58a45768563. * refactor(socketio): explicitly listen on port --------- Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
parent
0a0f6ac2ca
commit
98d38e7333
1 changed files with 5 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ const { Server } = require("socket.io");
|
|||
const { get_conf, get_redis_subscriber } = require("../node_utils");
|
||||
const conf = get_conf();
|
||||
|
||||
let io = new Server(conf.socketio_port, {
|
||||
let io = new Server({
|
||||
cors: {
|
||||
// Should be fine since we are ensuring whether hostname and origin are same before adding setting listeners for s socket
|
||||
origin: true,
|
||||
|
|
@ -52,3 +52,7 @@ subscriber.on("message", function (_channel, message) {
|
|||
|
||||
subscriber.subscribe("events");
|
||||
// =======================
|
||||
|
||||
let port = conf.socketio_port;
|
||||
io.listen(port);
|
||||
console.log("Realtime service listening on: ", port);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue