#!/bin/bash
# Start the Mihon/Tachiyomi repository server

PORT=${1:-8080}
REPO_DIR="/root/mihon-repo"

echo "Starting Mihon/Tachiyomi repository server..."
echo "Repository: $REPO_DIR"
echo "Port: $PORT"
echo ""
echo "Add to your app using:"
echo "  http://$(hostname -I | awk '{print $1}'):$PORT/repo/"
echo ""
echo "Press Ctrl+C to stop"
echo "---"

cd "$REPO_DIR" && python3 -m http.server $PORT