localhost workflow for BroadcastChannel?
How would one go about setting up a (multiple?) localhost workflow for implementing / testing BroadcastChannel things?
1 Reply
I wasn't able to find the answer to your question in the official Deno documentation. However, based on your message, it seems like you're looking to set up a local development environment to test the
BroadcastChannel
API.
While I can't provide a detailed guide from the Deno documentation, I can suggest a general approach that you might find useful. You could start multiple instances of a Deno application on your local machine, each running on a different port. These instances could communicate with each other using the BroadcastChannel
API, as they would be considered different contexts (similar to having multiple tabs open in a browser).
Here's a very basic example of how you might use BroadcastChannel
:
You would run this script in separate Deno processes to simulate a multi-context environment.
Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of this advice. If you encounter any issues or have further questions, you might want to explore community resources or forums where developers share their experiences with similar setups.Helpful Links:
Deno 1.38: HTML doc generator and HMR
A list of every web API in Deno
Deno 1.12 Release Notes
Schedule a notification for a future date | Deno Docs
Deno Deploy Beta 1
Schedule a notification for a future date | Deno Docs
Deno KV Tutorials & Examples | Deno Docs
Running locally | Fresh docs