Server¶
Server is the entry point for the application. Implemented using Flask and SocketIO for the API and WebSocket.
Server Config¶
By default, the server is configured to run in development mode. To run in production mode, set the SERVER_ENV
environment variable to production
.
director.entrypoint.api.server.LocalAppConfig
¶
Bases: BaseAppConfig
Local configuration for the app. All the default values can be change using environment variables. e.g. SERVER_PORT=8001
LOGGING_CONFIG
class-attribute
instance-attribute
¶
LOGGING_CONFIG = LOGGING_CONFIG
Logging configuration for the app.
director.entrypoint.api.server.ProductionAppConfig
¶
Bases: BaseAppConfig
Production configuration for the app. All the default values can be change using environment variables. e.g. SERVER_PORT=8001
LOGGING_CONFIG
class-attribute
instance-attribute
¶
LOGGING_CONFIG = LOGGING_CONFIG
Logging configuration for the app.
Server Initialization¶
director.entrypoint.api.create_app
¶
Create a Flask app using the app factory pattern.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
app_config |
object
|
The configuration object to use. |
required |
Returns:
Type | Description |
---|---|
A Flask app. |