cloudflare / cloudflare/websocket-template
Getting the socket to work on localhost
Open
- Dominant language
- JavaScript
- Stars
- 132
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm trying to get this template to work for localhost development, but so far I've been unsuccessful.
So far, I've taken the following steps:
1. modify `wrangler.toml` to include my `accound_id`
2. change the websocket protocol from `wss` to `ws` for running on localhost
3. run `wrangler dev`
However, when visit http://127.0.0.1:8787/ it throws a 400 as it's missing the upgrade header.
Any ideas on how to get rid of this? We want to try using webworker sockets for a multiplayer functionality at Candu, but I'm stuck on how to get setup on localhost development.
Contributor guide
Assessment
This issue has not been assessed yet.