mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-05 23:00:16 +00:00
1499110341
- Read worker count from WORKERS env var (default: 4) - Set WORKERS=4 in fly.toml for production - Allows tuning worker count without code changes - Can adjust via fly secrets set WORKERS=X
21 lines
379 B
Python
21 lines
379 B
Python
import os
|
|
import uvicorn
|
|
from .server import app
|
|
|
|
|
|
def main():
|
|
"""Main entry point for the KJV Study application."""
|
|
workers = int(os.getenv("WORKERS", "4"))
|
|
|
|
uvicorn.run(
|
|
"kjvstudy_org.server:app",
|
|
host="0.0.0.0",
|
|
port=8000,
|
|
reload=False,
|
|
log_level="info",
|
|
workers=workers
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main() |