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:
10
build.rs
Normal file
10
build.rs
Normal 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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user