Açıklama Yok

tanlie b3e3e84181 chore: add .env.example and README with DATABASE_URL example 1 ay önce
FastApi b3e3e84181 chore: add .env.example and README with DATABASE_URL example 1 ay önce
config a71e01525d dev-config 2 ay önce
wishing-admin cfd65c0c2b rename file 5 ay önce
wishing-admin-vue3 71bb9ce64e feat: 集成后端登录接口,增加图形验证码 4 ay önce
wishing-platform 9c961ed595 upms config 2 ay önce
wishing-tree-h5 a77345a7e3 feat: 管理员地图点击创建许愿树功能 4 ay önce
.env.example b3e3e84181 chore: add .env.example and README with DATABASE_URL example 1 ay önce
.gitignore 86fc4bc847 hi 4 ay önce
README.md b3e3e84181 chore: add .env.example and README with DATABASE_URL example 1 ay önce
plan-v1.md 732bc251b0 feat: 许愿树 H5 前端项目初始化 5 ay önce
working-history.md 8b5fc56209 feat: 同步后端许愿树列表接口,首页使用真实封面图 5 ay önce
许愿树创业计划书.pptx d85f6be2e8 plan 4 ay önce

README.md

Wishing Tree — FastAPI service

Setup

Create a .env file (or set environment variables) with your database connection. Do NOT commit secrets.

Recommended (preferred): set a full SQLAlchemy DATABASE_URL environment variable with URL-encoded password.

Example (PowerShell):

$env:DATABASE_URL = "mysql+pymysql://root:%40%40qinys12346..@192.168.1.177:3306/wishing_tree?charset=utf8mb4&serverTimezone=Asia/Shanghai&use_unicode=true&characterEncoding=utf-8"

Or set components separately (Windows PowerShell):

$env:DB_USER = "root" $env:DB_PASS = "@@qinys12346.." $env:DB_HOST = "192.168.1.177" $env:DB_PORT = "3306" $env:DB_NAME = "wishing_tree"

Dependencies

Install runtime dependencies for database access:

pip install sqlalchemy pymysql

Running

Start the app in development (example):

uvicorn main:app --reload --host 0.0.0.0 --port 8000

Notes

  • The project reads DATABASEURL if present; otherwise it composes a URL from DB* vars.
  • Passwords with special characters must be URL-encoded when used in DATABASE_URL.
  • Keep .env out of version control; use the provided .env.example as a template.