We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
目前看了README中的部署流程,主要是本地开发的流程,请问生产环境如何部署呢?
The text was updated successfully, but these errors were encountered:
$ git clone --depth=1 https://github.com/fecommnity/reactpress.git $ cd reactpress $ npm i -g pnpm $ pnpm i
项目启动后会加载根目录下的 .env 配置文件,请确保MySQL数据库服务和下面的配置保持一致,并提前创建好 reactpress 数据库
.env
reactpress
DB_HOST=127.0.0.1 // 数据库地址 DB_PORT=3306 // 端口 DB_USER=reactpress // 用户名 DB_PASSWD=reactpress // 密码 DB_DATABASE=reactpress // 数据库
环境准备好后,执行启动命令:
$ pnpm run build
$ pnpm run pm2
至此,ReactPress 服务就启动成功了。
当ReactPress代码更新后,可以按照如下Shell重新启动服务:
# 更新代码 git checkout master git pull # 安装依赖&构建 pnpm install pnpm run build # 启动进程 pm2 delete @reactpress/server pm2 delete @reactpress/client pnpm run pm2 # 开机启动 pm2 startup pm2 save
以上就是ReactPress生成环境的完整部署流程。
具体可以参考下这篇文章:https://blog.gaoredu.com/knowledge/c7edfecf-4f47-4bd3-ba93-093e43cf5314/880aa991-c47a-4f9f-bd0f-7c41e47cb94d
Sorry, something went wrong.
感谢🙏
fecommunity
redteav2
No branches or pull requests
目前看了README中的部署流程,主要是本地开发的流程,请问生产环境如何部署呢?
The text was updated successfully, but these errors were encountered: