Files
marqdo/tests/ext/web-w7-live-server.mq.md
T
cflmyandCursor b5c07385e9 feat(markup): finish v0.3 stock migration and green gold
Migrate remaining .mq.md (tests/ext/public/examples), stop elevating local assigns to params, inject form_target in Go libweb, and skip live LLM gold without a real key.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 23:43:44 +08:00

32 lines
823 B
Markdown

---
title: web W7 live server — 404, redirect, sitemap, robots, cache-control
import web:ext/web/web.mq.md
import plugin:lib/plugin.mq.md
import sys:lib/sys.mq.md
---
# main
**p = > plugin.native_path name="web"**
1. `p`
> plugin.load path=`p`
2. *
> sys.exit code=1
`items` =
| loc | note |
|-----|------|
| / | home |
| /about | about |
**pg = > web.page title="w7-live"**
**nf = > web.page title="Not Found Page"**
**app = > web.app page=`pg` port=18121**
**app = > `app`.configure cache_control="public, max-age=120"**
**app = > `app`.redirect from="/legacy" to="/" permanent=True**
**app = > `app`.error_page status=404 page=`nf`**
**app = > `app`.sitemap path="/sitemap.xml" base="http://127.0.0.1:18121" items=`items`**
**app = > `app`.robots sitemap="http://127.0.0.1:18121/sitemap.xml"**
> `app`.listen