add fastapi

This commit is contained in:
2025-03-19 13:54:31 +01:00
parent d0828d53a4
commit 03f01ca5a0
17 changed files with 1018 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
SHELL := /opt/homebrew/bin/fish
ifneq ("$(wildcard .env)", "")
include .env
export $(shell sed 's/=.*//' .env)
else
$(shell cp .env.example .env)
include .env
export $(shell sed 's/=.*//' .env)
endif
ifneq ("$(wildcard .env)", "")
$(info $(shell echo "Loading environment variables from .env file..."))
$(info $(shell cat .env))
$(info $(shell echo "***********************************************"))
endif
export-req:
@echo "Exporting requirements..."
uv export --no-hashes --format requirements-txt > requirements.txt
run-dev:
@echo "Running server..."
uvicorn app.main:app --host localhost --port 8000 --reload
run:
@echo "Running server..."
uvicorn app.main:app --host localhost --port 8000
@echo "Server running at http://localhost:8000"