Skip to content

Latest commit

 

History

History
23 lines (20 loc) · 449 Bytes

README.md

File metadata and controls

23 lines (20 loc) · 449 Bytes

Deno webSocketServer

Simple WebSocket server implemented in Deno.

Usage

Here is an example for a simple WebSocket server that logs the incoming message event.

webSocketServer(
    {
        hostname: 'localhost',
        port: 8080
    },
    (webSocket) => {
        webSocket.addEventListener(
            'message',
            (event) => {
                console.log(`MessageEvent: ${event}`);
            }
        )
    }
)