Removed nginx setup

This commit is contained in:
2026-01-28 12:10:45 -05:00
parent b2626f56ea
commit d960f6aa15
5 changed files with 250 additions and 112 deletions

10
main.py
View File

@@ -98,13 +98,21 @@ async def start_bot():
# Main Entry Point
async def main():
# Parse command-line arguments
import argparse
parser = argparse.ArgumentParser(description="Faction War Dispatch Bot")
parser.add_argument("--port", type=int, default=8000, help="Port to run the application on (default: 8000)")
parser.add_argument("--host", type=str, default="127.0.0.1", help="Host to bind to (default: 127.0.0.1)")
args = parser.parse_args()
# Start Discord bot in background
bot_task = asyncio.create_task(start_bot())
# Configure and run FastAPI server
config = uvicorn.Config(app, host="127.0.0.1", port=8000, log_level="info")
config = uvicorn.Config(app, host=args.host, port=args.port, log_level="info")
server = uvicorn.Server(config)
print(f"Starting server on {args.host}:{args.port}")
await server.serve()
if __name__ == "__main__":