Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
# Enable compression for all responses
Compress(app)

# Ensure data directory exists before initializing the database
os.makedirs("data", exist_ok=True)

# Initialize database on startup
init_db()

Expand Down
1 change: 1 addition & 0 deletions start-librecrawl.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@echo off

if not exist data mkdir data
echo Checking for Docker...
docker --version 2>nul
if errorlevel 1 goto nodocker
Expand Down
1 change: 1 addition & 0 deletions start-librecrawl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Start LibreCrawl - tries Docker first, falls back to Python

mkdir -p data
echo "Checking for Docker..."
if command -v docker &> /dev/null && command -v docker compose &> /dev/null; then
echo "Docker found! Starting LibreCrawl with Docker..."
Expand Down