build/config.js

  1. 1// backend
  2. 2const backend = {
  3. 3 port: 7102,
  4. 4 hostname: '0.0.0.0',
  5. 5};
  6. 6
  7. 7// front
  8. 8const front = {
  9. 9 build: {
  10. 10 productionSourceMap: true,
  11. 11 uglify: true,
  12. 12 },
  13. 13 dev: {
  14. 14 // hostname: 'localhost',
  15. 15 port: 9192,
  16. 16 // proxyBaseURL: 'http://localhost:7002',
  17. 17 },
  18. 18};
  19. 19
  20. 20module.exports = {
  21. 21 front,
  22. 22 backend,
  23. 23};
Name Description
backend.port backend service’s port
backend.hostname backend service’s ip
front.build.productionSourceMap Generate SourceMap file or not
front.build.uglify uglify codes or not
front.dev.hostname frontend development service’s hostname
front.dev.port frontend development service’s port
front.dev.proxyBaseURL proxy to other PC’s backend service

front.dev.proxyBaseURL: In team development, the API fetchings performed by the current PC’s frontend will be automatically proxied to the other PC’s backend service