Skip to content

Commit

Permalink
chore: backup
Browse files Browse the repository at this point in the history
  • Loading branch information
rayadaschn committed Feb 7, 2025
1 parent e0a94ae commit 72d372a
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 9 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,17 @@ antd 🔥 + 🐣 unocss + 🤺 ahooks 的问卷调查
- [x] 登录页
- [x] 编辑页
- [x] 统计页

「运行」

```bash
# 安装依赖
pnpm i

# 运行时,会同时启动本地服务,和 Mock 服务
pnpm dev

# 亦可分别开启服务
pnpm dev:prev
pnpm dev:mock
```
2 changes: 1 addition & 1 deletion config/.env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ VITE_DEPLOY_BASE_URL=/survey-sage/

# 接口的网关地址
# 用于 axios 的拦截器动态拼接接口 URL
VITE_API_BASE_URL=https://huy.wiki:3002/
VITE_API_BASE_URL=http://localhost:3001/

# 本地存储前缀
VITE_STORAGE_PREFIX=survey-dev
2 changes: 2 additions & 0 deletions mock/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ mockList.forEach((item) => {

app.use(router.routes())
app.listen(3001) // port 端口

console.info('➜ mock server is running at http://localhost:3001')
27 changes: 21 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "survey-sage",
"version": "0.0.0",
"version": "0.0.1",
"description": "基于 React18 + Vite + TS 的调查问卷",
"author": "huy",
"license": "MIT",
"type": "module",
"scripts": {
"dev": "vite --mode dev --host",
"dev": "npm run dev:prev & npm run dev:mock",
"dev:prev": "vite --mode dev --host",
"dev:test": "vite --mode test --host",
"dev:prod": "vite --mode prod --host",
"dev:mock": "cd mock && npm run dev",
Expand Down

0 comments on commit 72d372a

Please sign in to comment.