Giter VIP home page Giter VIP logo

study_fastapi's Introduction

study_fastapi

study_svelte 저장소의 Backend

memo

  • FastAPI의 개발용 서버 구동 명령어
uvicorn main:app --reload

alembic 기반 migration 관련

  • alembic 시작
alembic init migrations
  • revision 생성
alembic revision --autogenerate
  • 최신 리비전으로 migration 실행
alembic upgrade head

configuration 관련

  • config.ini, .env 파일을 통해 각종 환경 설정 제어
# DEFAULT
mode = dev

# AUTH
token_expire_minutes = 0000
secret_key = ****
algorithm = ****
  • 비밀번호 등 외부 저장소에 저장해서는 안 되는 정보는 key.json으로 별도 관리 + 암호화
{
    "db": {
        "dev": {
            "drivername": "sqlite+aiosqlite",
            "database": "./sql_app.db"
        },
        "test": {
            "drivername": "mysql+aiomysql",
            "username": "root",
            "password": "****",
            "host": "host.docker.internal",
            "port": "3306",
            "database": "fastapi"
        }
    }
}

Docker

  • Dockerfile build
docker build -t fastboard .
  • Docker container run
docker run -itd -p 8000:8000 --name fastboard fastboard

study_fastapi's People

Contributors

djccnt15 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.