initial commit
새로운 repository 를 만들었습니다.
This commit is contained in:
27
backend/start_server.sh
Normal file
27
backend/start_server.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Exit on error
|
||||
set -e
|
||||
|
||||
# Navigate to the backend directory
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Check if virtual environment exists, create if it doesn't
|
||||
if [ ! -d ".venv" ]; then
|
||||
echo "Creating virtual environment..."
|
||||
uv venv
|
||||
fi
|
||||
|
||||
# Activate virtual environment
|
||||
source .venv/bin/activate
|
||||
|
||||
# Install dependencies if needed
|
||||
echo "Checking dependencies..."
|
||||
uv pip install -r requirements.txt
|
||||
|
||||
# Start the FastAPI server
|
||||
echo "Starting server..."
|
||||
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
|
||||
|
||||
# Note: The --host 0.0.0.0 parameter makes the server accessible from other devices on the network
|
||||
# Remove it if you only want local access
|
||||
Reference in New Issue
Block a user