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