Hello, I am trying to use Websocket

Hello, I am trying to use Websocket Server that built on Durable object for Minecraft, that connects web to Minecraft by using /connect command(known as /wsserver). The app that I created is fully working on Developing environment, however, it is not working on production deployment. Is there any differences of behaviour between development enviroment(by wrangler dev) and production? as a reference, this is code of it
export class Instances extends DurableObject {
async fetch(request: Request): Promise<Response> {
const webSocketPair = new WebSocketPair();
const [client, server] = Object.values(webSocketPair);
this.ctx.acceptWebSocket(server);

return new Response(null, {
status: 101,
webSocket: client,
});
}
}
export class Instances extends DurableObject {
async fetch(request: Request): Promise<Response> {
const webSocketPair = new WebSocketPair();
const [client, server] = Object.values(webSocketPair);
this.ctx.acceptWebSocket(server);

return new Response(null, {
status: 101,
webSocket: client,
});
}
}
https://community.cloudflare.com/t/is-there-any-difference-between-dev-prod-in-durable-object-websocket-server/653357
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server