Confusing Documentation on Fresh Websocket

Open
#3,867 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Quiet
Tech stack
deno, typescript

Research direction

Read the Fresh WebSocket development documentation and check the version guidance against available Fresh releases. Then clarify how to run a separate Deno entry point alongside Vite, including a concrete setup example; done when the release guidance is accurate and a newcomer can test WebSocket changes without rebuilding each time.

Written by the indexing model from the issue text.

Description

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?

Dominant language
TypeScript
Stars
13.8k
Forks
757
Avg merge
3m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from freshframework/fresh

All issues in freshframework/fresh

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.