#exam = app.include_router(example.router)
app.include_router(example.router)
-@app.get("/")
-async def index(request: Request):
- return templates.TemplateResponse(
- request= request, name= "main/index.html"
- )
+# @app.get("/")
+# async def index(request: Request):
+# return templates.TemplateResponse(
+# request= request, name= "main/index.html"
+# )
if __name__ == '__main__':
uvicorn.run(app= "main:app", host= "0.0.0.0", port= 33001, reload= True)
return {"msg": f"exam: {param}"}
#url데이터 받아서 템플릿에 넘겨주기
-@router.get('/exam2/{param}')
-async def exam2(request: Request, param: str):
- return templates.TemplateResponse(request= request, name= "main/index.html", context={"param": param})
+# @router.get('/exam2/{param}')
+# async def exam2(request: Request, param: str):
+# return templates.TemplateResponse(request= request, name= "main/index.html", context={"param": param})
#get 데이터 받기
@router.get('/exam3')
fuser -k 33001/tcp
-nohup .venv/bin/python3.10 app/main.py nicezip.zois.kr:33001 &
+nohup .venv/bin/python3.10 app/main.py back-nicezip.zois.kr:33001 &
+++ /dev/null
-<!DOCTYPE html>
-
-<html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <!-- vue 불러오기 -->
- <script src="https://unpkg.com/vue"></script>
- <title>schedule</title>
- </head>
- <body>
- <div id = 'app'>
- <p>[[ title ]]</p>
- </div>
- </body>
- <script>
- new Vue({
- delimiters: ['[[', ']]'],
- el: '#app',
- data: {
- title: 'Welcome My Schedule',
- }
- })
- </script>
-</html>
\ No newline at end of file