Slackbot
06/19/2023, 5:54 PMAshish Singh
06/19/2023, 7:42 PMjson
Adam Alpire
06/20/2023, 6:02 AMAdam Alpire
06/20/2023, 6:03 AMAshish Singh
06/20/2023, 12:25 PMAdam Alpire
06/20/2023, 1:27 PMbentoml serve …
using the python debugger?Ashish Singh
06/20/2023, 1:45 PMdef start_server(*, port=80):
"""Function to start uvicorn server for development."""
uvicorn.run(
svc.asgi_app,
host="0.0.0.0",
port=port,
)
Then you can just run the this code like any other python module using
if __name__=="__main__":
start_server()
Ashish Singh
06/20/2023, 1:45 PMsvc.asgi_app
is only recommended for debugging and should not be used for production use case.Ashish Singh
06/20/2023, 1:46 PMAdam Alpire
06/20/2023, 1:48 PMAshish Singh
06/20/2023, 1:48 PM