oslabs-beta / sono.land

Real-time Communication Library for Deno (WebSockets & WebRTC)
https://sono.land
150 stars 24 forks source link

fix: Change Websocket to Deno's native method #10

Closed KonghaYao closed 3 months ago

KonghaYao commented 4 months ago

Description

Hello, I really like the sono.land project! When I started Deno and wanted to implement some related features, I found that it didn't run very well on my Deno version 1.42.3. So I forked this repository and improved the source code based on Deno's documentation about websockets. It runs well in my deno-script and I hope to upgrade the sono version on deno.land.

Reproduction steps

just run it in latest Deno version

import { Sono } from "https://denopkg.dev/gh/KonghaYao/sono.land@main/src/server.ts?33";
const sono = new Sono();
Deno.serve(async (req) => {
    return sono.connect(req);
});

Checklist