Skip to content

Latest commit

 

History

History

tic-tac-toe-hono

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Tic-tac-toe (Hono + socka)

Self-contained example: duplicated contract and game logic, @hono/node-server with @hono/node-ws and sockaHonoNodeWs, WebSocket route /ws/:roomId, and a browser client built with bun build --target=browser.

Run

bun install
bun run dev

Default HTTP port is 3462 (distinct from the Bun and DO examples in this repo). Open http://localhost:3462 or set PORT when starting the server. Use two tabs with the same room id to play.

Scripts

  • dev — build public/client.js, then run the server with --watch
  • start — build client, then run once
  • build:client — emit public/client.js
  • typecheck — tsgo over src/

See socka, Getting started (pick your stack), and the documentation hub.