mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-04-29 03:00:45 -04:00
Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: simonrosenberg <157206163+simonrosenberg@users.noreply.github.com>
31 lines
1.2 KiB
Python
31 lines
1.2 KiB
Python
# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026
|
|
# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.
|
|
# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:
|
|
# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk
|
|
# - V1 application server (in this repo): openhands/app_server/
|
|
# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.
|
|
# Tag: Legacy-V0
|
|
# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.
|
|
import os
|
|
|
|
import uvicorn
|
|
|
|
from openhands.core.logger import LOG_JSON, get_uvicorn_log_config
|
|
|
|
|
|
def main():
|
|
log_config = get_uvicorn_log_config()
|
|
|
|
uvicorn.run(
|
|
'openhands.server.listen:app',
|
|
host='0.0.0.0',
|
|
port=int(os.environ.get('port') or '3000'),
|
|
log_level='debug' if os.environ.get('DEBUG') else 'info',
|
|
log_config=log_config,
|
|
use_colors=False if LOG_JSON else None,
|
|
)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|