Home

Issue: 762

How to set up proxy with nuxt.config.js

[issue link]
 dev: {
    env: require('./dev.env'),
    port: 8888,
    autoOpenBrowser: true,
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    proxyTable: {
      '/api': {
        target: 'http://localhost:8080',
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      },
      '/local': {
        target: 'http://localhost:3000',
        changeOrigin: true,
        pathRewrite: {
          '^/local': ''
        }
      }
    }

thanks

This question is available on Nuxt.js community (#c651)