You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.6 KiB
1.6 KiB
jf_202506
介绍
202506小程序交付
软件架构
taro react
依赖工具
- 开发框架:tarojs@4.1.2
- 基础架构:react@18.0
- ui框架:antd-mobile@5.39
项目启动
- node > ver.18
- 安装yarn@1.22.19,执行
yarn install
- 执行
npm run dev:h5
,本地启动 - 执行
npm run build:h5
,打包编译
项目部署
-
本地构建
// 1. git 操作拉取项目,此处省略... // 2. 进入到项目根目录 yarn install // 3. 编译构建 npm run build:h5
-
登录宝塔平台
-
网站/HTML项目 下 添加HTML项目
-
修改nginx配置文件
location ^~/api { proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; proxy_set_header Connection ''; proxy_buffering off; proxy_cache off; proxy_read_timeout 86400s; send_timeout 86400s; client_max_body_size 50m; # 这里改成 [对应的域名 + /api] proxy_pass https://he.lehuonianhua.com/api; }
-
上传生产包
-
重启nginx
讨论
联系人:jinech 13478707150@163.com