가이드

플라스크 설치

  1. 개발 환경 설치하기 (이 가이드는 Visual Studio Code 개발 환경 위주로 설명되어 있다.)

    1. https://code.visualstudio.com/download 에 들어가서 개인 컴퓨터에 맞는 버전을 선택해야 한다.

      Screenshot 2024-12-04 at 10.16.31 AM.png

  2. Anaconda 설치하기

    1. https://www.anaconda.com/download/success링크로 Anaconda 설치하기

    2. Mac 이나 Windows 의 Python 3.12 64-Bit Graphical Installer 를 선택하기

      image.png

    3. 설치 여부 확인히기 위해서 터미널을 열고 아래와 같이 python command을 쓰면 설치 상태를 보여준다. 설치가 완료되면 아래와 같이 보여준다.

    Screenshot 2024-12-04 at 10.25.26 AM.png

  3. Visual Studio Code 설정히기

    1. Extensions 탭에 가서 python을 검색하고 Install 하기

    image.png

    1. Visual Studio Code 의 검색바에 “Show and Run Commands” 을 클릭하기
    2. Terminal: New Terminal 클릭하기

    image.png

    1. 하단 화면에 Terminal 가 뜬다.

    image.png

    1. 가상환경을 생성하기 위해서 Terminal 창에서 초기 상태는 (base) 상태에 conda create -n <가상환경 이름> python==<버전> 입력하기
    2. 가상환경을 활성화하기 위해 conda activate <가상환경이름>
    3. flask 설치하기 위해 conda install flask
    4. Setting > Encoding UTF-8 로 설정

    image.png

    1. 프로젝트를 생성하기 위해서 Explorer 에 가서 Open Folder 를 클릭 → 로컬에 clone repository 했던 폴더를 선택하기
    2. 생성한 가상환경의 Python Interpreter 연결하기 위해 Show and Run Commands > Python: Select Interpreter

    image.png

image.png

Screenshot 2024-12-04 at 1.11.33 AM.png

  1. 실행하려면 flask —debug run 사용한다.

firebase 설치

  1. 터미널을 열고 pip install pyrebase4 입력하기

image.png

  1. https://firebase.google.com/ 에 들어가서 구글로 로그인하기
  2. Create a project 클릭해서 프로젝트 이름을 입력하기 → Continue 클리하기
  3. Build 을 클릭하기 > Realtime database 선택하기
  4. Create database 클릭하기

Screenshot 2024-12-04 at 1.59.26 AM.png