#!/bin/bash # Start Oxigraph Server for GLAM Frontend Development # # Usage: ./scripts/start-oxigraph.sh [--reset] set -e # Add oxigraph to PATH export PATH="$HOME/.local/bin:$PATH" # Configuration DB_DIR="$(pwd)/data/oxigraph-db" HOST="127.0.0.1" PORT="7878" # Check for --reset flag if [ "$1" == "--reset" ]; then echo "🗑️ Removing existing database..." rm -rf "$DB_DIR" fi # Create database directory mkdir -p "$DB_DIR" echo "🚀 Starting Oxigraph Server..." echo "📁 Database: $DB_DIR" echo "🌐 Endpoint: http://$HOST:$PORT" echo "" echo "SPARQL Query endpoint: http://$HOST:$PORT/query" echo "SPARQL Update endpoint: http://$HOST:$PORT/update" echo "Graph Store Protocol: http://$HOST:$PORT/store" echo "" echo "Press Ctrl+C to stop" echo "" # Start server (new v0.5+ command syntax) oxigraph_server serve \ --location "$DB_DIR" \ --bind "$HOST:$PORT"