vue3, pinia, urql, windicss, daisyui, vite, python, fastapi, strawberry-graphql, sqlalchemy, poetry
backend폴더에 .config파일 수정
[DATABASE]
DB_USER_NAME =
DB_USER_PASSWD =
DB_HOST = 127.0.0.1
DB_NAME =
CREATE TABLE `tb_code_m` (
`C_ID` VARCHAR(10) NULL DEFAULT NULL COLLATE 'utf8mb3_general_ci',
`C_PARENT_ID` VARCHAR(10) NULL DEFAULT NULL COLLATE 'utf8mb3_general_ci',
`C_NAME` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8mb3_general_ci',
`C_ENG_NAME` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
`C_DESCRIPTION` VARCHAR(1000) NULL DEFAULT NULL COLLATE 'utf8mb3_general_ci'
)
COLLATE='utf8mb3_general_ci'
ENGINE=InnoDB
;
CREATE TABLE `tb_code_problem` (
`CP_SEQ` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`CP_CATEGORY_CD` VARCHAR(10) NULL DEFAULT NULL COLLATE 'utf8mb3_general_ci',
`CP_TITLE` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8mb3_general_ci',
`CP_LEVEL_CD` VARCHAR(10) NULL DEFAULT NULL COLLATE 'utf8mb3_general_ci',
`CP_CONTENT` TEXT NULL DEFAULT NULL COLLATE 'utf8mb3_general_ci',
`CP_TAG` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8mb3_general_ci',
`CP_LAPTIME` DATETIME NULL DEFAULT NULL,
PRIMARY KEY (`CP_SEQ`) USING BTREE
)
COLLATE='utf8mb3_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=9
;
CREATE TABLE `users` (
`id` VARCHAR(50) NOT NULL DEFAULT 'AUTO_INCREMENT' COLLATE 'utf8mb3_general_ci',
`name` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb3_general_ci',
`password` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb3_general_ci',
PRIMARY KEY (`id`) USING BTREE
)
COLLATE='utf8mb3_general_ci'
ENGINE=InnoDB
;
frontend 폴더에서
npm install
실행 시킴
osx / linux / bashonwindows은 아래 curl url을 터미널에 입력해서 설치하면 된다
# Linux
curl -sSL https://install.python-poetry.org | python3 -
# Windows
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
poetry install
install 후 .venv 가상환경이 생성되니 VSCODE로 작업 시 python: select interpretor를 .venv/Scrpits/python.exe를 설치하자 (안하는 경우 실행은 되겠지만 코드 warning을 마주하게 된다. app/root.py에서 vscode 디버깅하세요)
poetry run python main.py
로 실행한다.
npm run dev