H5-Dooring 私有化部署流程(中文版指南)
作者: MrXujiang创建于 2022年12月12日更新于 2025年4月6日
Editor project
Companies that have purchased the private authorization can enter the delivered "editor" project and run the installation package command:
yarnAfter installation, run the following command:
yarn startAt this time, the IP port number accessed will be printed in the terminal control panel, and you can run it in the browser.
Building
In the project's "package.json" file, you can see the following script configuration:
"scripts": {
"start": "umi dev -- editor",
"start:h5": "umi dev -- h5",
"start:down": "umi dev -- downH5",
"build": "umi build -- editor",
"build:h5": "umi build -- h5",
"build:down": "umi build -- downH5"
},Here, we'll explain the use of these commands:
- "build" is used to package the editor project
- "build:h5" is used to package the H5 base project, which is required
- "build:down" is used to package the base project for downloading H5 page code (mainly used for downloading H5 page code online) After running the build, the packaged files will be moved to the "server/static" directory. Deployment only requires deployment of the "server" directory.
Common configuration
We use "umi3.0" for projecting, so we manage the common configuration for the editor in the ".umirc.ts" file. Here, we need to pay attention to the "define" section, which is mainly used to provide custom configuration:
define: {
START_ENV,
lang,
// Configure the domain name for accessing the H5 side
h5Domain: 'cn.dooring.vip',
// Set the current version number
curVersion: dooringVersion,
// Record information
copyright: '鄂ICP备18024675号-3',
// Whether to display the update pop-up
// ...内容来源: MrXujiang/h5-Dooring