Files
mengyastore/README.md
2026-03-21 12:18:29 +08:00

62 lines
1.1 KiB
Markdown
Raw 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.
# mengyastore
萌芽小店,一个前后端分离的商城项目。
## 项目结构
- `mengyastore-frontend/`Vue 3 + Vite 前端
- `mengyastore-backend/`Go + Gin 后端
- `mengyastore-backend/data/json/`:商品、订单、站点配置等本地数据
## 功能
- 商品浏览、详情查看、下单
- 登录回调与用户订单页
- 后台商品管理
- 访问统计、商品浏览统计
## 本地运行
### 前端
```bash
cd mengyastore-frontend
npm install
npm run dev
```
默认会连接 `http://localhost:8080`,如需修改后端地址可设置:
```bash
VITE_API_BASE_URL=http://localhost:8080
```
### 后端
```bash
cd mengyastore-backend
go run .
```
后端默认监听 `http://localhost:8080`
### 后端配置
后端配置文件在 `mengyastore-backend/data/json/settings.json`,当前主要是:
- `adminToken`:后台管理口令
## Docker
后端目录下已提供 `Dockerfile``docker-compose.yml`
```bash
cd mengyastore-backend
docker compose up -d --build
```
## 说明
- 仓库不提交依赖目录和构建产物
- 本地数据文件都保存在 `mengyastore-backend/data/json/`