Add .env.example with environment configuration template

提供環境變數設定範本,包含:
- 資料庫連線設定
- Gmail SMTP 郵件設定
- Flask 應用程式設定

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-03 18:40:49 +08:00
parent f524713cb6
commit 5b4041afd5

44
.env.example Normal file
View File

@@ -0,0 +1,44 @@
# ============================================
# HBR 爬蟲系統 - 環境變數設定範本
# ============================================
#
# 使用方式:
# 1. 複製此檔案並命名為 .env
# 2. 填入實際的設定值
# 3. .env 檔案不會被提交到 Git
#
# ============================================
# --------------------------------------------
# 資料庫設定 (MySQL/MariaDB)
# --------------------------------------------
DB_HOST=mysql.example.com
DB_PORT=3306
DB_USER=your_username
DB_PASSWORD=your_password
DB_NAME=your_database
# --------------------------------------------
# 郵件設定 (Gmail SMTP)
# --------------------------------------------
# Gmail 帳號
GMAIL_USERNAME=your_email@gmail.com
# Gmail App Password (16碼)
# 請至 Google 帳戶設定 > 安全性 > 兩步驟驗證 > 應用程式密碼 產生
GMAIL_APP_PASSWORD=xxxx xxxx xxxx xxxx
# 收件人 Email
MAIL_TO=recipient@example.com
# --------------------------------------------
# Flask 設定 (可選)
# --------------------------------------------
# Flask 密鑰 (用於 session 加密,請使用隨機字串)
FLASK_SECRET_KEY=your_random_secret_key_here
# 執行環境: development / production
FLASK_ENV=development
# 除錯模式: True / False
FLASK_DEBUG=True