Add config/config.yaml to set default configurations. Use the config/local_config.yaml to set the custom configurations Change-Id: I22049e478b6440c765751c8f17663f36f33c277a
2.4 KiB
Ready To Work
For more information about installation, refer to the source-install-ubuntu
Preparation before development
Node environment
- Requirement in package.json:
"node": ">=10.22.0" - Verify nodejs version
node -v- Requirement in package.json:
Yarn
- Install yarn
npm install -g yarnInstall dependencies
- Execute in the project root directory, which is the same level as
package.json, and wait patiently for the installation to complete
yarn install- Execute in the project root directory, which is the same level as
Prepare a usable backend
- Prepare an accessible backend, for example:
https://172.20.154.250 - Add file
config/local_config.yaml:
server: https://172.20.154.250- Prepare an accessible backend, for example:
Configure access host and port
The default configuration is in
config/config.yamlhostis0.0.0.0portis8088
- If the current configuration does not need to be changed, the following steps do not need to be operated.
Added file
config/local_config.yamlAdd
hostandportconfigurations
host: localhost port: 8080Completed
- Execute in the project root directory, which is the same level as
package.json
yarn run dev- Use the
hostandportconfigured inconfig/config.yamlorconfig/local_config.yamlto access, such ashttp://localhost:8088 - The front-end real-time update environment used for development is done.
- Execute in the project root directory, which is the same level as
Front-end package used in production environment
Have the required nodejs and yarn
Execute in the project root directory, which is the same level as
package.json
yarn run build
The packaged files are in the dist directory and handed
over to the deployment personnel.
Front-end package used for testing
Have the required nodejs and yarn
Execute in the project root directory, which is the same level as
package.json
yarn run build:test
The packaged files are in the dist directory
Note
This test package is designed to measure code coverage
It is recommended to use nginx to complete the E2E test with code coverage