set service refname as default ws path

This commit is contained in:
SrGooglo 2025-03-31 23:47:20 +00:00
parent e3dfb6ce36
commit 2866038ed0
2 changed files with 8 additions and 2 deletions

View File

@ -67,7 +67,10 @@ export default class HyperExpressEngineNG {
if (this.ctx.constructor.enableWebsockets === true) { if (this.ctx.constructor.enableWebsockets === true) {
this.ws = global.websocket = new rtengineng({ this.ws = global.websocket = new rtengineng({
path: this.ctx.constructor.wsPath, path:
this.ctx.constructor.wsPath ??
this.ctx.constructor.refName ??
"/",
onUpgrade: this.ctx.handleWsUpgrade, onUpgrade: this.ctx.handleWsUpgrade,
onConnection: this.ctx.handleWsConnection, onConnection: this.ctx.handleWsConnection,
onDisconnect: this.ctx.handleWsDisconnect, onDisconnect: this.ctx.handleWsDisconnect,

View File

@ -366,7 +366,10 @@ class Server {
}, },
websocket: { websocket: {
enabled: this.constructor.enableWebsockets, enabled: this.constructor.enableWebsockets,
path: this.constructor.wsPath ?? "/", path:
this.constructor.wsPath ??
this.constructor.refName ??
"/",
}, },
listen: { listen: {
ip: this.params.listen_ip, ip: this.params.listen_ip,