cleanup, docs
This commit is contained in:
@@ -33,14 +33,6 @@ A sensible status code is set before the page renders (`503` for compiling, `500
|
||||
|
||||
Without this key, a request that hits an uncompiled or changed page blocks until the synchronous build finishes. With it, the runtime responds immediately with your page, hands the build to the proactive compiler, and the page can poll until the build lands:
|
||||
|
||||
```cpp
|
||||
RENDER(Request& context)
|
||||
{
|
||||
context.header["Refresh"] = "2";
|
||||
<><!doctype html><html><head><meta http-equiv="refresh" content="2"></head>
|
||||
<body>Building… this page reloads automatically.</body></html></>
|
||||
}
|
||||
```
|
||||
|
||||
The compiling page is only used while `PROACTIVE_COMPILE_ENABLED` is on (the default) — otherwise nothing would finish the build asynchronously, and the runtime waits for the on-request wasm compile.
|
||||
|
||||
@@ -59,3 +51,6 @@ While an error page renders, error-page handling is disabled: a compiling, broke
|
||||
## Ready-made examples
|
||||
|
||||
`site/errors/compiling.uce`, `site/errors/compiler-error.uce`, and `site/errors/runtime-error.uce` in this repository are working examples — point the config keys at them or copy them into your site.
|
||||
|
||||
:example
|
||||
print("error_pages example\n");
|
||||
|
||||
Reference in New Issue
Block a user