harbor/docs/ui_contribution_get_started.md
FangyuanCheng 0fb141e4ee add get_study document
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
2019-01-11 14:01:21 +08:00

101 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Harbor frontend environment get started guide
If you already have a harbor backend environment, you can build a frontend development environment with the following configuration.
1. Create the file proxy.config.json in the directory harbor/src/portaland config it according to the sample below.
**NOTE:** You should replace “$IP_ADDRESS” with your own ip address.
```
{
"/api/*": {
"target": "$IP_ADDRESS",
"secure": false,
"changeOrigin": true,
"logLevel": "debug"
},
"/service/*": {
"target": "$IP_ADDRESS",
"secure": false,
"logLevel": "debug"
},
"/c/login": {
"target": "$IP_ADDRESS",
"secure": false,
"logLevel": "debug"
},
"/sign_in": {
"target": "$IP_ADDRESS",
"secure": false,
"logLevel": "debug"
},
"/c/log_out": {
"target": "$IP_ADDRESS",
"secure": false,
"logLevel": "debug"
},
"/sendEmail": {
"target": "$IP_ADDRESS",
"secure": false,
"logLevel": "debug"
},
"/language": {
"target": "$IP_ADDRESS",
"secure": false,
"logLevel": "debug"
},
"/reset": {
"target": "$IP_ADDRESS",
"secure": false,
"logLevel": "debug"
},
"/userExists": {
"target": "$IP_ADDRESS",
"secure": false,
"logLevel": "debug"
},
"/reset_password": {
"target": "$IP_ADDRESS",
"secure": false,
"logLevel": "debug"
},
"/i18n/lang/*.json": {
"target": "$IP_ADDRESS",
"secure": false,
"logLevel": "debug",
"pathRewrite": { "^/src$": "" }
},
"/chartrepo": {
"target": "$IP_ADDRESS",
"secure": false,
"logLevel": "debug"
},
"/*.json": {
"target": "$IP_ADDRESS",
"secure": false,
"logLevel": "debug"
}
}
```
2. Open the terminal and run the following commandinstall npm packages as 3rd-party dependencies.
```
cd harbor/src/portal
npm install
```
3. Compile the frontend code by the following command.
```
npm run build_all
```
4. Execute the following commandserve Harbor locally.
```
npm run start
```
5. Then you can visit the Harbor by address: https://localhost:4200.