더북(TheBook)

3. 이제 터미널에서 .venv가 있는 경로에서 다음 명령을 실행합니다.

fastapi dev appserver/app.py

 

다음과 같은 메시지가 출력될 것입니다.

FastAPI Starting development server 🚀
        Searching for package file structure from directories with __init__.py files
        Importing from /Users/hannal/Workspace/puddingcamp/release-your-product-with-fastapi

module   📁 appserver
        ├── 🐍 __init__.py
        └── 🐍 app.py

    code   Importing the FastAPI app object from the module with the following code:

        from appserver.app import app

    app   Using import string: appserver.app:app

server   Server started at http://127.0.0.1:8000
server   Documentation at http://127.0.0.1:8000/docs

    tip   Running in development mode, for production use: fastapi run

        Logs:

    INFO   Will watch for changes in these directories: ['/Users/hannal/Workspace/puddingcamp/release-your-product-with-fastapi']
    INFO   Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    INFO   Started reloader process [35586] using WatchFiles
    INFO   Started server process [35589]
    INFO   Waiting for application startup.
    INFO   Application startup complete.
신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.