Skip to content

Getting the socket to work on localhost #1

@mresposito

Description

@mresposito

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions