728x90
pip install pipenv # pipenv 가상환경
pipenv --python 3.13 # 3.13 버전으로 가상환경 설정
pipenv install fastapi # fastapi 설치
pipenv install "uvicorn[standard]" # ASGI 서버 설치
# main.py
from typing import Union
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return {"Hello": "World"}
uvicorn main:app --reload
PS E:\projects\menu_bot> uvicorn main:app --reload
INFO: Will watch for changes in these directories: ['E:\\projects\\menu_bot']
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [13300] using WatchFiles
ERROR: Error loading ASGI app. Attribute "app" not found in module "main".
INFO: Stopping reloader process [13300]
엥 Error loading ASGI app. Attribute "app" not found in module "main".
????????
아...
맨날 기본 자동저장 세팅되는 파이참 쓰다가 거의 5년 만에 vs code 기반 커서 설치해서 사용하려다 보니 이런일이
File > Auto Save ...
반응형