21 lines
463 B
Bash
21 lines
463 B
Bash
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
# STL Storage Application Startup Script
|
||
|
|
set -e
|
||
|
|
|
||
|
|
echo "🚀 Starting STL Storage Application..."
|
||
|
|
|
||
|
|
# Initialize database if it doesn't exist
|
||
|
|
if [ ! -f "stl_storage.db" ]; then
|
||
|
|
echo "📦 Initializing database..."
|
||
|
|
node init-db.js
|
||
|
|
else
|
||
|
|
echo "✅ Database already exists"
|
||
|
|
fi
|
||
|
|
|
||
|
|
# Create uploads directory if it doesn't exist
|
||
|
|
mkdir -p uploads/stl uploads/thumbnails
|
||
|
|
|
||
|
|
# Start the application
|
||
|
|
echo "🌐 Starting web server..."
|
||
|
|
exec node server.js
|