Update app/main.py
Browse files- app/main.py +6 -0
app/main.py
CHANGED
|
@@ -19,6 +19,12 @@ app.add_middleware(
|
|
| 19 |
allow_headers=["*"],
|
| 20 |
)
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
# Include API routes
|
| 23 |
app.include_router(endpoints.router, prefix="/api/v1", tags=["videos"])
|
| 24 |
|
|
|
|
| 19 |
allow_headers=["*"],
|
| 20 |
)
|
| 21 |
|
| 22 |
+
if __name__ == "__main__":
|
| 23 |
+
import uvicorn
|
| 24 |
+
log(f"===== Application Startup at {__import__('datetime').datetime.now().strftime('%Y-%m-%d %H:%M:%S')} =====")
|
| 25 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
# Include API routes
|
| 29 |
app.include_router(endpoints.router, prefix="/api/v1", tags=["videos"])
|
| 30 |
|