refactor(web): restructure Vue3 app layout
This commit is contained in:
53
README.md
Normal file
53
README.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# Memora
|
||||
|
||||
一个背单词应用(Web + Go API + 记忆引擎)。
|
||||
|
||||
## 目录
|
||||
|
||||
- `memora-web`:前端(Vue3 + Vite + Element Plus)
|
||||
- `memora-api`:后端(Go + Gin + GORM + MySQL)
|
||||
- `memora-engine`:记忆引擎(后续可抽成独立服务/库)
|
||||
|
||||
## 快速启动(推荐 Docker)
|
||||
|
||||
> 由于当前机器可能未安装 Go,本项目提供 Docker 方式启动。
|
||||
|
||||
1. 进入项目根目录:
|
||||
|
||||
```bash
|
||||
cd /home/wsy182/Documents/code/memora
|
||||
```
|
||||
|
||||
2. 复制并编辑后端配置:
|
||||
|
||||
```bash
|
||||
cp memora-api/config.yaml memora-api/config.local.yaml
|
||||
```
|
||||
|
||||
3. 启动:
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
- API: http://localhost:8080
|
||||
- Web: http://localhost:3000
|
||||
|
||||
## 本地启动(不使用 Docker)
|
||||
|
||||
### 启动 API
|
||||
|
||||
```bash
|
||||
cd memora-api
|
||||
# 确保已安装 Go 1.21+
|
||||
go mod tidy
|
||||
go run main.go
|
||||
```
|
||||
|
||||
### 启动 Web
|
||||
|
||||
```bash
|
||||
cd memora-web
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
Reference in New Issue
Block a user