tree: d1c7189dbf416bae77bf81eaa8f461d3f1702f55 [path history] [tgz]
  1. build/
  2. config/
  3. integration-test/
  4. src/
  5. static/
  6. .babelrc
  7. .editorconfig
  8. .eslintignore
  9. .eslintrc.js
  10. .gitignore
  11. .postcssrc.js
  12. favicon.ico
  13. index.html
  14. package.json
  15. README.md
front-end/README.md

Pulsar manager front end

Compatibility

The pulsar-manager is tested with Chrome browser.

Set cross domain

Add proxyTable. For localhost debug

    proxyTable: {
      '/admin/*': {
        target: 'http://localhost:7750/',
        changeOrigin: true
      },
      '/pulsar-manager/*': {
        target: 'http://localhost:7750/',
        changeOrigin: true
      },
      '/lookup/*': {
        target: 'http://localhost:7750/',
        changeOrigin: true
      }
    },

Deploy production environment

  • Add the following parameters to the Nginx server configuration file prod.env.js.
module.exports = {
  NODE_ENV: '"production"',
  ENV_CONFIG: '"prod"'
}

Add configuration to the configuration file on Nginx server

  • Replace localhost with the IP address of the backend service.
  listen       9527;
  server_name  0.0.0.0;


  location / {
    root   /usr/share/nginx/html/dist;
    index  index.html index.htm;
  }

  location /admin {
    proxy_pass http://localhost:7750;
  }

  location /pulsar-manager {
    proxy_pass http://localhost:7750;
  }

  location /lookup {
    proxy_pass http://localhost:7750;
  }

Build file for production

cd front-end
npm run build:prod

Copy file of dist to Nginx server /usr/share/nginx/html/dist

Copy dist file to Nginx server and restart Nginx

Open a browser and visit the following address:

http://nginx-server:9527/#/login