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) {
this.ws = global.websocket = new rtengineng({
path: this.ctx.constructor.wsPath,
path:
this.ctx.constructor.wsPath ??
this.ctx.constructor.refName ??
"/",
onUpgrade: this.ctx.handleWsUpgrade,
onConnection: this.ctx.handleWsConnection,
onDisconnect: this.ctx.handleWsDisconnect,

View File

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