A real-time communication module for Deno.
server.ts:
import { Sono } from 'https://deno.land/x/sono@v1.0/mod.ts';
const sono = new Sono();
client.ts:
import { SonoClient } from 'https://deno.land/x/sono@v1.0/mod.ts';
const sono = new SonoClient('ws://localhost:8080/ws');
sono.on('hello', (event) => {
console.log(event, 'world')
})
Import directly from deno.land / github.
deps.ts:
import { Sono } from 'https://deno.land/x/sono@v1.0/mod.ts';
Find the documentation here.