Refactor into generic SQL template framework

- Replace hardcoded Person struct with dynamic column handling
- Add configurable directives: sqlite_db, sqlite_query, sqlite_template
- Support arbitrary SQL queries with any table/column structure
- Create generic execute_query() function returning dynamic JSON data
- Update handler to render templates with configurable paths
- Add build.rs for macOS dynamic linking support
- Fix handler return value to prevent 'header already sent' errors
This commit is contained in:
Edward Langley
2025-11-15 13:18:21 -08:00
parent b4b89d8898
commit b28ff2db17
2 changed files with 13 additions and 4 deletions

10
build.rs Normal file
View File

@ -0,0 +1,10 @@
fn main() {
// On macOS, we need to link against the nginx object files
// because dynamic libraries can't have undefined symbols
#[cfg(target_os = "macos")]
{
println!("cargo:rustc-link-arg=-undefined");
println!("cargo:rustc-link-arg=dynamic_lookup");
}
}