Skip to content

Confusing Documentation on Fresh Websocket #3867

@eaallen

Description

@eaallen

First off, I am new to fresh and deno, but I really like it. I am considering using this for next big project.

One of the issues is getting fresh setup with Websockets. The documentation says this:

WebSocket upgrades under the Vite dev server (deno task dev) require Fresh 2.4+ and Deno 2.8+. On older versions Deno.upgradeWebSocket() cannot complete the 101 handshake for requests Vite forwards from its Node HTTP server, so ctx.upgrade() and app.ws() silently hang and the open handler is never invoked.

My problem is that Fresh 2.4+ does not seem to exist yet (is there a plan to release it soon)?

My second issue is with the last half of the documentation:

Alternatively, run a separate Deno entry point (e.g. deno serve -A main.ts) alongside Vite, or host the WebSocket server as a sidecar on its own port.

It is not clear to me that I am doing this right. Documentation is sparse.

Is it possible to get the websocket dev setup so I do not have to rebuild e verytime i want to test changes in my websocket code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions