[feat] add fastapi adapter
This commit is contained in:
parent
05543bbbbb
commit
a930185754
12 changed files with 220 additions and 16 deletions
15
main.py
Normal file
15
main.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import uvicorn
|
||||
|
||||
from adapter.config.loader import load_config
|
||||
from adapter.http.fastapi.app import create_app
|
||||
|
||||
config = load_config()
|
||||
app = create_app(config)
|
||||
|
||||
|
||||
def run() -> None:
|
||||
uvicorn.run(app, host=config.http.host, port=config.http.port)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
Loading…
Add table
Add a link
Reference in a new issue