build/config.js

// title
const title = 'cabloy-demo';

// backend
const backend = {
  port: 7002,
  hostname: '127.0.0.1',
};

// front
const front = {
  build: {
    title,
    productionSourceMap: true,
    uglify: true,
  },
  dev: {
    title,
    hostname: 'localhost',
    port: 9092,
    // proxyBaseURL: 'http://localhost:7002',
  },
};

module.exports = {
  front,
  backend,
};
Name Description
title website’s title
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