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/portal,and config it according to the sample below.

      NOTE: You should replace “$IP_ADDRESS” with your own ip address.

      1. {
      2. "/api/*": {
      3. "target": "$IP_ADDRESS",
      4. "secure": false,
      5. "changeOrigin": true,
      6. "logLevel": "debug"
      7. },
      8. "/service/*": {
      9. "target": "$IP_ADDRESS",
      10. "secure": false,
      11. "logLevel": "debug"
      12. },
      13. "/c/login": {
      14. "target": "$IP_ADDRESS",
      15. "secure": false,
      16. "logLevel": "debug"
      17. },
      18. "/sign_in": {
      19. "target": "$IP_ADDRESS",
      20. "secure": false,
      21. "logLevel": "debug"
      22. },
      23. "/c/log_out": {
      24. "target": "$IP_ADDRESS",
      25. "secure": false,
      26. "logLevel": "debug"
      27. },
      28. "/sendEmail": {
      29. "target": "$IP_ADDRESS",
      30. "secure": false,
      31. "logLevel": "debug"
      32. },
      33. "/language": {
      34. "target": "$IP_ADDRESS",
      35. "secure": false,
      36. "logLevel": "debug"
      37. },
      38. "/reset": {
      39. "target": "$IP_ADDRESS",
      40. "secure": false,
      41. "logLevel": "debug"
      42. },
      43. "/userExists": {
      44. "target": "$IP_ADDRESS",
      45. "secure": false,
      46. "logLevel": "debug"
      47. },
      48. "/reset_password": {
      49. "target": "$IP_ADDRESS",
      50. "secure": false,
      51. "logLevel": "debug"
      52. },
      53. "/i18n/lang/*.json": {
      54. "target": "$IP_ADDRESS",
      55. "secure": false,
      56. "logLevel": "debug",
      57. "pathRewrite": { "^/src$": "" }
      58. },
      59. "/chartrepo": {
      60. "target": "$IP_ADDRESS",
      61. "secure": false,
      62. "logLevel": "debug"
      63. },
      64. "/*.json": {
      65. "target": "$IP_ADDRESS",
      66. "secure": false,
      67. "logLevel": "debug"
      68. }
      69. }
    2. Open the terminal and run the following command,install npm packages as 3rd-party dependencies.

      1. cd harbor/src/portal
      2. npm install
    3. Execute the following command,serve Harbor locally.

      1. npm run start
    4. Then you can visit the Harbor by address: https://localhost:4200.