feat: added static for main page, added views.py: index, get_condig, websocket_endpoint (functionality for receiving commands from the frontend), added main.py: creating an application, connecting static and connecting a router, added Settings.py: class Settings with model_config and stream_url
This commit is contained in:
14
src/web_robot_control/main.py
Normal file
14
src/web_robot_control/main.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from fastapi import FastAPI
|
||||
from starlette.staticfiles import StaticFiles
|
||||
|
||||
from web_robot_control.views import router
|
||||
|
||||
|
||||
# создаем экземпляр FastAPI
|
||||
app = FastAPI()
|
||||
|
||||
# подключаем статические файлы
|
||||
app.mount('/static', StaticFiles(directory='static'), name='static')
|
||||
|
||||
# подключаем роутер
|
||||
app.include_router(router)
|
||||
Reference in New Issue
Block a user