UNPKG

wsmini

Version:

Minimalist WebSocket client and server for real-time applications with RPC, PubSub, Rooms and Game state synchronization.

33 lines 752 B
<!DOCTYPE html> <html> <head> <meta charset='utf-8'> <title>Rpc</title> <meta name='viewport' content='width=device-width, initial-scale=1'> <script src='rpc.js' type="module"></script> <style> * { box-sizing: border-box } h1 { text-align: center } body { display: flex; flex-direction: column; height: calc(100dvh - 3rem); justify-content: space-between; } p { margin: 0 } #results { overflow-y: auto; height: 100%; } </style> </head> <body> <h1>Rpc</h1> <div id="results"></div> <form id="rpc-form"> <input type="number" id="n1" value="1"> <input type="text" id="n2" value="2"> <button>Add</button> </form> </body> </html>