Rename project from nginx-test to sqlite-serve

- Updated package name in Cargo.toml: nginx-test → sqlite-serve
- Updated library name: libnginx_test.dylib → libsqlite_serve.dylib
- Updated all load_module directives in nginx configs
- Updated build checks in start scripts
- Updated branding in footer template
- Updated project name in all README files

The name 'sqlite-serve' better reflects the module's purpose:
serving dynamic content from SQLite databases via NGINX.
This commit is contained in:
Edward Langley
2025-11-15 15:11:44 -08:00
parent 7a169e34d5
commit 775467da51
12 changed files with 24 additions and 26 deletions

22
Cargo.lock generated
View File

@ -373,17 +373,6 @@ dependencies = [
"shlex",
]
[[package]]
name = "nginx-test"
version = "0.1.0"
dependencies = [
"handlebars",
"ngx",
"rusqlite",
"serde",
"serde_json",
]
[[package]]
name = "ngx"
version = "0.5.0"
@ -624,6 +613,17 @@ version = "1.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
[[package]]
name = "sqlite-serve"
version = "0.1.0"
dependencies = [
"handlebars",
"ngx",
"rusqlite",
"serde",
"serde_json",
]
[[package]]
name = "strsim"
version = "0.11.1"

View File

@ -1,5 +1,5 @@
[package]
name = "nginx-test"
name = "sqlite-serve"
version = "0.1.0"
edition = "2024"

View File

@ -1,4 +1,4 @@
# nginx-test - SQLite Module for NGINX
# sqlite-serve - SQLite Module for NGINX
A dynamic NGINX module written in Rust that integrates SQLite databases with Handlebars templating, enabling data-driven web applications directly from NGINX configuration.
@ -251,7 +251,7 @@ Request → NGINX → Module Handler → SQLite Query
## Project Structure
```
nginx-test/
sqlite-serve/
├── src/
│ └── lib.rs # Module implementation
├── conf/

View File

@ -1,6 +1,6 @@
# Book Catalog Example
A complete example demonstrating the nginx-test SQLite module with a read-only book catalog.
A complete example demonstrating the sqlite-serve module with a read-only book catalog.
## Features
@ -54,7 +54,7 @@ Open your browser to:
## Directory Structure
```
nginx-test/
sqlite-serve/
├── book_catalog.db # SQLite database
├── setup_book_catalog.sh # Database setup script
├── conf/

View File

@ -1,6 +1,6 @@
# Path Parameters Feature
The nginx-test SQLite module supports parameterized SQL queries using nginx variables. This allows you to pass dynamic values from the request (query parameters, path captures, headers, etc.) as safe SQL prepared statement parameters.
The sqlite-serve module supports parameterized SQL queries using nginx variables. This allows you to pass dynamic values from the request (query parameters, path captures, headers, etc.) as safe SQL prepared statement parameters.
## New Directive

View File

@ -1,7 +1,7 @@
# Book Catalog Configuration
# Demonstrates the nginx-test SQLite module with multiple locations and template inheritance
# Demonstrates the sqlite-serve module with multiple locations and template inheritance
load_module target/debug/libnginx_test.dylib;
load_module target/debug/libsqlite_serve.dylib;
worker_processes 1;
events {}

View File

@ -1,7 +1,7 @@
# Book Detail Configuration
# Demonstrates using path parameters with the SQLite module
load_module target/debug/libnginx_test.dylib;
load_module target/debug/libsqlite_serve.dylib;
worker_processes 1;
events {}

View File

@ -1,5 +1,5 @@
# Add the path to your library here.
load_module target/debug/libnginx_test.dylib;
load_module target/debug/libsqlite_serve.dylib;
worker_processes 1;

View File

@ -1,6 +1,6 @@
</main>
<footer style="background: #f8f9fa; padding: 2rem; text-align: center; border-top: 2px solid #e9ecef; color: #6c757d;">
<p>📖 Powered by nginx-test SQLite Module</p>
<p>📖 Powered by sqlite-serve</p>
<p style="margin-top: 0.5rem; font-size: 0.9rem;">A demonstration of Rust + NGINX + SQLite + Handlebars</p>
</footer>
</div>

View File

@ -407,8 +407,6 @@ http_request_handler!(howto_access_handler, |request: &mut http::Request| {
.unwrap_or("");
// Resolve query parameters from nginx variables
let _ = std::fs::write("/tmp/nginx_debug.txt", format!("Query: {}\nParams: {:?}\n", co.query, co.query_params));
let mut param_values: Vec<String> = Vec::new();
for var_name in &co.query_params {
let value = if var_name.starts_with('$') {

View File

@ -14,7 +14,7 @@ if [ ! -f "book_catalog.db" ]; then
fi
# Check if module is built
if [ ! -f "target/debug/libnginx_test.dylib" ]; then
if [ ! -f "target/debug/libsqlite_serve.dylib" ]; then
echo "Module not built. Building..."
direnv exec "$PWD" cargo build
echo ""

View File

@ -14,7 +14,7 @@ if [ ! -f "book_catalog.db" ]; then
fi
# Check if module is built
if [ ! -f "target/debug/libnginx_test.dylib" ]; then
if [ ! -f "target/debug/libsqlite_serve.dylib" ]; then
echo "Module not built. Building..."
direnv exec "$PWD" cargo build
echo ""