https://github.com/futurewan/react-vip
react-vip
https://github.com/futurewan/react-vip
antd-mobile react react-router-v4 redux webpack
Last synced: 2 months ago
JSON representation
react-vip
- Host: GitHub
- URL: https://github.com/futurewan/react-vip
- Owner: futurewan
- Created: 2018-03-15T02:54:45.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-11-16T01:44:39.000Z (over 4 years ago)
- Last Synced: 2025-04-13T20:54:23.273Z (about 1 year ago)
- Topics: antd-mobile, react, react-router-v4, redux, webpack
- Language: CSS
- Homepage:
- Size: 1.27 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 运行环境
- 首先确保node运行环境>= 6.9
### 前端运行环境
本项目依赖于webpack3,react-router4.0及以上版本,使用react、redux、antd-mobile等
- `npm install`
### node后端运行环境
依赖于express4及以上版本
- `npm install`
## 项目运行
本项目为前端用react,服务端用express,使用需要先开启服务
### 开发环境
- 终端1 cd server && npm start 服务端运行在9005端口
- 终端2 回到根目录 npm start 并打开项目`http://127.0.0.1:9006`
### 生产环境
- 根目录`npm run build`资源打包进server的public目录下
- cd server && npm start
- 访问页面地址`http://127.0.0.1:9005`可直接访问服务端口
## 主要目录结构
```
.
├── .vscode # node开发环境配置文件
├── server # 后台服务
│ ├── bin # 程序启动和渲染
│ ├── database # 存放页面所需要的json数据
│ ├── public # 前端静态资源存放位置
│ ├── util # 工具库方法
│ ├── routes # 路由于请求接口管理
│ ├── views # 前端模板存放位置
│ ├── app.js # 后台服务入口
├── src # 程序源文件
│ ├── main.js # 程序启动和渲染
│ ├── app.js # 程序根组件
│ ├── store.js # Redux管理
│ ├── components # 全局组件
│ ├── lib # 全局方法
│ ├── pages # 项目页面结构
│ ├── assets # 静态文件
│ └── routes # 前端路由管理
└
```