Files
marqdo/examples/web-net-site/README.md
T
cflmyandCursor 7645dd4c1f Extend network stack: session/auth, WebSocket, cookie/multipart primitives
Add the network-extension wave to lib/net and the web ABI plugin:
- lib/net cookie_parse / multipart_parse host primitives (EN/ZH)
- plugins/web session store + /admin login gate + WebSocket client/server
- ext/web author surface (EN/ZH) for session, auth, ws
- form update flow and page-level validation echo tests
- fix string escapes: \xHH, \u{...}, unknown escapes kept verbatim
- map Chinese component slots (导航/侧栏/页脚) so sidebar renders
- resolve relative static/db paths against the entry script dir (entry_dir)
- new tutorial chapter 14, EN/ZH example sites, and gold tests

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 14:58:46 +08:00

908 B

examples/web-net-site

Demonstrates the network-extended ext/web + lib/net surface (design doc/design/ext-web-net.md).

cargo build -p marqdo_plugin_web
cargo run -- examples/web-net-site/index.mq.md

Then open http://127.0.0.1:18083/:

  • / — articles from SQLite plus a live WebSocket widget (/live, served by public/live.js)
  • /about
  • /new — form POST to /_form/article
  • /tools — parsing demos powered by lib/net: net.cookie_parse and net.multipart_parse
  • /admin — session-gated admin; sign in with admin / secret
  • /live — WebSocket echo endpoint (try it from the home widget, or with web.ws.connect)

You may run it from the repo root or from this directory: relative static_dir (e.g. public) and relative db paths (e.g. data/site-net.db) resolve against the entry script's directory, not the terminal's current working directory.