If you already have a harbor backend environment, you can build a frontend development environment with the following configuration.
Create the file proxy.config.json in the directory harbor/src/portal,and config it according to the sample below.
NOTE: You should replace “hostname” with an available Harbor hostname.
[
{
"context": [
"/api",
"/c",
"/i18n",
"/chartrepo",
"/LICENSE",
"/swagger.json",
"/swagger2.json",
"/devcenter-api-2.0",
"/swagger-ui.bundle.js"
],
"target": "https://hostname",
"secure": false,
"changeOrigin": true,
"logLevel": "debug"
}
]
Open the terminal and run the following command,install npm packages as 3rd-party dependencies.
cd harbor/src/portal
npm install
Execute the following command,serve Harbor locally.
npm run start
Then you can visit the Harbor by address: https://localhost:4200.