Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

前端、后端打包与运行不会操作 #17

Open
oscarklv opened this issue Apr 21, 2023 · 1 comment
Open

前端、后端打包与运行不会操作 #17

oscarklv opened this issue Apr 21, 2023 · 1 comment

Comments

@oscarklv
Copy link

  1. 修改根目录下 .env 文件中的 API_URL 为你的实际后端接口公网地址。
    这个后端接口公网地址是甚么呀? 根目录是chatgpt-plus吗?

  2. 将 dist 文件夹内的文件复制到你网站 前端服务 的目录下。
    你网站 前端服务 的目录是甚么呀? 文件是甚么文件?

  3. 运行部署同理,将 service/dist 文件夹内的文件复制到你网站 后端服务 的目录下。
    后端服务 的目录是甚么呀? 文件是甚么文件?

@zhpd
Copy link
Owner

zhpd commented Apr 25, 2023

1、如果是服务器部署运行,则API_URL填写服务器http://ip:3002,端口是默认的后端端口
2、前端运行npm run build后,会生成next(名称还原为nextjs默认的了)打包文件夹,可以直接复制拷贝。
3、后端运行npm run build后,会生成dist打包文件夹,可以直接复制拷贝
建议先本地打包运行看下效果,或者直接服务器拷贝项目源码,直接在服务器端安装依赖后,运行npm run build & npm run
start运行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants