phase-0: scaffold backend and frontend shell
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
.PHONY: dev backend frontend test seed install
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
VENV_BIN := .venv/Scripts
|
||||
PYTHON_SYS := python
|
||||
else
|
||||
VENV_BIN := .venv/bin
|
||||
PYTHON_SYS := python3
|
||||
endif
|
||||
|
||||
dev:
|
||||
$(MAKE) -j2 backend frontend
|
||||
|
||||
backend:
|
||||
cd backend && "$(VENV_BIN)/uvicorn" app.main:app --reload --port 8000
|
||||
|
||||
frontend:
|
||||
cd frontend && npm run dev
|
||||
|
||||
test:
|
||||
cd backend && "$(VENV_BIN)/python" -m pytest tests/ -v
|
||||
|
||||
seed:
|
||||
cd backend && "$(VENV_BIN)/python" -m app.seed.seed
|
||||
|
||||
install:
|
||||
$(PYTHON_SYS) -m venv backend/.venv
|
||||
"backend/$(VENV_BIN)/pip" install -r backend/requirements.txt
|
||||
cd frontend && npm install
|
||||
Reference in New Issue
Block a user