finance-tools/README.md

43 lines
894 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Investor RPG 開發環境
## 第一次啟動
需要 Node.js 18 以上版本。在終端機執行:
```bash
cd /Users/daniel/Desktop/finance/app
cp .env.example .env # 已經有 .env 時不要執行這行
npm install
npm run dev:all
```
啟動完成後開啟 <http://localhost:5173>
`npm run dev:all` 會同時啟動:
- 前端 Vite<http://localhost:5173>
- 後端 API<http://localhost:3000>
- API 健康檢查:<http://localhost:3000/api/health>
`Ctrl+C` 會一起關閉前端與後端。
## 日常啟動
```bash
cd /Users/daniel/Desktop/finance/app
npm run dev:all
```
不要只執行 `npm run dev`;那只會啟動前端,沒有後端 API 時頁面資料功能不會運作。
## Docker 啟動
若要用接近正式環境的方式啟動:
```bash
cd /Users/daniel/Desktop/finance/app
docker compose up --build
```
完成後開啟 <http://localhost:8080>