feat: add test automation and backend startup scripts
This commit is contained in:
30
run_backend.sh
Normal file
30
run_backend.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Colors
|
||||
YELLOW='\033[1;33m'
|
||||
GREEN='\033[0;32m'
|
||||
NC='\033[0m'
|
||||
|
||||
cd server
|
||||
|
||||
echo -e "${YELLOW}Checking Python...${NC}"
|
||||
python --version
|
||||
|
||||
echo -e "${YELLOW}Creating venv...${NC}"
|
||||
if [ ! -d "venv" ]; then
|
||||
python -m venv venv
|
||||
fi
|
||||
|
||||
echo -e "${YELLOW}Activating venv...${NC}"
|
||||
source venv/Scripts/activate 2>/dev/null || source venv/bin/activate
|
||||
|
||||
echo -e "${YELLOW}Installing dependencies...${NC}"
|
||||
pip install -q -r requirements.txt
|
||||
|
||||
echo -e "${GREEN}✓ Dependencies installed${NC}"
|
||||
echo ""
|
||||
echo -e "${YELLOW}Starting backend on http://localhost:8000${NC}"
|
||||
echo -e "${YELLOW}Docs available at http://localhost:8000/docs${NC}"
|
||||
echo ""
|
||||
|
||||
python -m uvicorn app.main:app --reload --port 8000
|
||||
Reference in New Issue
Block a user