Files
nginx-serve/start_book_catalog.sh
Edward Langley 775467da51 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.
2025-11-15 15:11:44 -08:00

38 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# Quick start script for the book catalog example
set -e
echo "📚 Starting Book Catalog..."
echo ""
# Check if database exists
if [ ! -f "book_catalog.db" ]; then
echo "Database not found. Running setup..."
./setup_book_catalog.sh
echo ""
fi
# Check if module is built
if [ ! -f "target/debug/libsqlite_serve.dylib" ]; then
echo "Module not built. Building..."
direnv exec "$PWD" cargo build
echo ""
fi
# Start nginx
echo "Starting nginx on http://localhost:8080"
./ngx_src/nginx-1.28.0/objs/nginx -c conf/book_catalog.conf -p .
echo ""
echo "✅ Book Catalog is running!"
echo ""
echo "Visit:"
echo " • http://localhost:8080/books/all - All books"
echo " • http://localhost:8080/books/programming - Programming books"
echo " • http://localhost:8080/books/databases - Database books"
echo " • http://localhost:8080/books/computer-science - CS books"
echo ""
echo "To stop: ./ngx_src/nginx-1.28.0/objs/nginx -s stop -c conf/book_catalog.conf -p ."