Skip to content

Commit da43a43

Browse files
committed
Create start_api.py
1 parent ca838fc commit da43a43

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

scripts/start_api.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Start ModelSync API server
4+
"""
5+
6+
import uvicorn
7+
import sys
8+
import os
9+
from pathlib import Path
10+
11+
# Add project root to Python path
12+
project_root = Path(__file__).parent.parent
13+
sys.path.insert(0, str(project_root))
14+
15+
if __name__ == "__main__":
16+
print("🚀 Starting ModelSync API server...")
17+
print("📡 API will be available at: http://localhost:8000")
18+
print("📚 API documentation at: http://localhost:8000/docs")
19+
print("🛑 Press Ctrl+C to stop the server")
20+
21+
uvicorn.run(
22+
"modelsync.api.main:app",
23+
host="0.0.0.0",
24+
port=8000,
25+
reload=True,
26+
log_level="info"
27+
)

0 commit comments

Comments
 (0)