add readme

This commit is contained in:
DATAEXPRESS\4734
2026-01-19 18:08:58 +08:00
parent 65f033adbc
commit cbac1971ab
+19 -19
View File
@@ -1,39 +1,39 @@
/my-api-v2 /my-api-v2
├── .env # 環境變數 (DB 帳密, Mail 帳密) ├── .env # 環境變數 (DB 帳密, Mail 帳密)
├── server.js # 主程式 (Entry Point) ├── server.js # 主程式 (Entry Point)
├── src/ ├── src/
│ ├── config/ │ ├── config/
│ │ └── db.js # MariaDB 連線池設定 │ │ └── db.js # MariaDB 連線池設定
│ ├── services/ │ ├── services/
│ │ ├── ormService.js # 核心 ORM 與 SP 邏輯 │ │ ├── ormService.js # 核心 ORM 與 SP 邏輯
│ │ ├── uploadService.js # 檔案上傳邏輯 │ │ ├── uploadService.js # 檔案上傳邏輯
│ │ └── mailService.js # 郵件與排程邏輯 │ │ └── mailService.js # 郵件與排程邏輯
│ └── utils/ │ └── utils/
│ └── helper.js # 通用工具函式 (quotstr, date format) │ └── helper.js # 通用工具函式 (quotstr, date format)
└── public/upload # 檔案上傳目錄 └── public/upload # 檔案上傳目錄
>> https://gemini.google.com/app/57091040afbd48e1 >> https://gemini.google.com/app/57091040afbd48e1
# 1. 初始化 npm 專案 (若尚未執行) # 1. 初始化 npm 專案 (若尚未執行)
npm init -y npm init -y
# 2. 安裝核心 Web 框架與安全套件 # 2. 安裝核心 Web 框架與安全套件
npm install express cors helmet dotenv npm install express cors helmet dotenv
# 3. 安裝資料庫驅動 (MariaDB/MySQL) # 3. 安裝資料庫驅動 (MariaDB/MySQL)
npm install mysql2 npm install mysql2
# 4. 安裝檔案處理與上傳套件 # 4. 安裝檔案處理與上傳套件
npm install multer npm install multer
# 5. 安裝郵件與排程套件 # 5. 安裝郵件與排程套件
npm install nodemailer node-schedule npm install nodemailer node-schedule
# 6. 安裝進階 Log 管理系統 # 6. 安裝進階 Log 管理系統
npm install morgan winston winston-daily-rotate-file npm install morgan winston winston-daily-rotate-file
# 7. (選用) 安裝開發環境自動重啟工具 # 7. (選用) 安裝開發環境自動重啟工具
npm install --save-dev nodemon npm install --save-dev nodemon