code wiki / _hdl_build / nx_aw_devserver.nx
nx_aw_devserver.nx
buildroot/runtime/_hdl_build/nx_aw_devserver.nx
about
nx_aw_devserver.nx -- a REAL front-end for the CMS capabilities: a plain-HTTP server (loopback) that
ROUTES requests and renders responses LIVE using the actual capability organs -- so the features are
finally testable from a browser, not just unit gates. Routes:
GET / -> home, rendered from the i18n content store (English)
GET /?lang=fr -> SAME page in French (nx_cms_i18n RFC-4647 resolve, live)
GET /moderate?text=.. -> live comment moderation (nx_cms_comments score + verdict)
GET /price?cents=&qty=&tax= -> live integer-exact money (nx_cms_ecommerce, no float)
GET /ab?visitor=.. -> live deterministic A/B variant assignment (nx_cms_abtest)
GET /health -> ok
Composes nx_http_server (serve) + the capability organs. Plain HTTP for local front-end testing; the
live site uses the TLS daemon. license_tier: ORIGINAL
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_http_server.nxnx_cms_i18n.nxnx_cms_comments.nxnx_cms_ecommerce.nxnx_cms_abtest.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 18 | const DS_MAGIC_8192: i64 = 8192 |
| 19 | const DS_MAGIC_2048: i64 = 2048 |
| 20 | const DS_MAGIC_65536: i64 = 65536 |
| 21 | const DS_MAGIC_70000: i64 = 70000 |
| 22 | const DS_MAGIC_100000: i64 = 100000 |
| 23 | const DS_MAGIC_1999: i64 = 1999 |
| 25 | const DS_PORT: i64 = 8099 |
functions
| 27 | func ds_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 28 | func ds_app(dst: *u8, o: i64, s: *u8) -> i64 { var p: i64=o; var k: i64=0; while s[k]!=(0 as u8){dst[p]=s[k];p=p+1;k=k+1} return p } called by 1: ds_head |
| 29 | func ds_appb(dst: *u8, o: i64, src: *u8, n: i64) -> i64 { var p: i64=o; var k: i64=0; while k<n{dst[p]=src[k];p=p+1;k=k+1} return p } |
| 30 | func ds_appn(dst: *u8, o: i64, v: i64) -> i64 calls 1: sys_mmap |
| 36 | func ds_find(buf: *u8, n: i64, pat: *u8, plen: i64) -> i64 |
| 49 | func ds_target(req: *u8, rn: i64, out: *u8, cap: i64) -> i64 |
| 60 | func ds_starts(s: *u8, sl: i64, pat: *u8) -> i64 |
| 67 | func ds_qstr(target: *u8, tl: i64, key: *u8, out: *u8, cap: i64) -> i64 |
| 78 | func ds_qint(target: *u8, tl: i64, key: *u8) -> i64 |
| 89 | func ds_head(body: *u8, o: i64, title: *u8) -> i64 calls 1: ds_app |
| 97 | func ds_foot(body: *u8, o: i64) -> i64 |
| 101 | func main() -> i64 |