From c39916ee0b2ee37073fbcf0c5d533ae3cdf07355 Mon Sep 17 00:00:00 2001 From: Edward Langley Date: Sat, 15 Nov 2025 13:08:34 -0800 Subject: [PATCH] chore: make more generic --- .envrc | 1 + conf/howto.conf | 4 +- person.hbs | 2 +- src/lib.rs | 273 ++++++++++++++++++++++++++++-------------------- 4 files changed, 167 insertions(+), 113 deletions(-) diff --git a/.envrc b/.envrc index 13841f7..b310385 100644 --- a/.envrc +++ b/.envrc @@ -2,3 +2,4 @@ use flake unset TMPDIR export NGINX_SOURCE_DIR=$PWD/ngx_src/nginx-1.28.0 export ZLIB_VERSION=1.3.1 +export CFLAGS='-Wno-unterminated-string-initialization' diff --git a/conf/howto.conf b/conf/howto.conf index 8fdaa17..840b179 100644 --- a/conf/howto.conf +++ b/conf/howto.conf @@ -14,7 +14,9 @@ http { location / { add_header "Content-Type" "text/html"; - howto "GET"; + sqlite_db "db.sqlite3"; + sqlite_query "SELECT id, name, address FROM person"; + sqlite_template "person.hbs"; } } } diff --git a/person.hbs b/person.hbs index a66eae4..bcfa982 100644 --- a/person.hbs +++ b/person.hbs @@ -1,4 +1,4 @@