diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-13 12:18:53 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-13 12:18:53 +0800 |
commit | 478f73b93c37e5e32ce33eb1de963eeb23a5cc40 (patch) | |
tree | 2b6496ded87c220ef0e5d5061806ee1d66683a27 /main.ha | |
parent | Begin to use hare-htmpl (diff) | |
download | forge-478f73b93c37e5e32ce33eb1de963eeb23a5cc40.tar.gz forge-478f73b93c37e5e32ce33eb1de963eeb23a5cc40.tar.zst forge-478f73b93c37e5e32ce33eb1de963eeb23a5cc40.zip |
Add basic template rendering
Diffstat (limited to 'main.ha')
-rw-r--r-- | main.ha | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -67,7 +67,5 @@ export fn main() void = { export fn handlereq(conn: io::handle, request: *http::request) (void | io::error | nomem) = { htmpl::write(conn, "HTTP/1.1 200 OK\r\n")?; htmpl::write(conn, "Content-Type: text/html\r\n\r\n")?; - htmpl::write(conn, "<!DOCTYPE html><html><body><h1>")?; - htmpl::write_escape_html(conn, "Hey there <3")?; - htmpl::write(conn, "</h1></body></html>")?; + tp_index(conn)?; }; |