support-organizer/backend/fgo_request_manager/__main__.py
Firq 03901e1d12
All checks were successful
/ build:package (push) Successful in 11s
/ backend-pylint (push) Successful in 21s
updated package to conform to pylint
2023-12-21 17:11:47 +01:00

26 lines
839 B
Python

# pylint: disable=multiple-statements,wrong-import-position,wrong-import-order
from gevent.monkey import patch_all; patch_all()
from gevent.pywsgi import WSGIServer
from .app import Application
from .routes import routes
from .routes.requests import routes_requests
from .config import ServerSettings
APP = Application.get_instance()
app, api = APP.app, APP.api
api.register_blueprint(routes)
api.register_blueprint(routes_requests)
HOSTNAME = ServerSettings.HOSTNAME
PORT = ServerSettings.PORT
if __name__ == '__main__':
http_Server = WSGIServer((HOSTNAME, PORT), app)
try:
print(f"Server available on http://{HOSTNAME}:{PORT}/")
print(f"View docs on http://{HOSTNAME}:{PORT}/swagger")
http_Server.serve_forever()
except KeyboardInterrupt:
print("Keyboard interrupt received, stopping...")