-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
35 lines (28 loc) · 854 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# !/usr/bin/python3
# -*- coding: utf-8 -*-
"""
@Author : Yingqing Shan
@Version : V1.0.0
------------------------------------
@File : main.py
@Description :
@CreateTime : 2022/11/18 11:36
@Software : PyCharm
------------------------------------
@ModifyTime : 2022/11/18 11:36
"""
import uvicorn
from apps import FastSkeletonApp
def create_app():
'''
创建我们的Fastapi对象
:return:
'''
# from apps.middleware.logroute import ContextIncludedRoute
# self.app.router.route_class = ContextIncludedRoute
startge = FastSkeletonApp()
# 返回fastapi的App对象
return startge.app
app = create_app()
if __name__ == '__main__':
uvicorn.run('main:app', host='127.0.0.1', port=9080, log_level='debug', reload=True, access_log=True, workers=1, use_colors=True)