Skip to content

Instantly share code, notes, and snippets.

@sunnyone
Created September 23, 2018 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sunnyone/f2b103d5647fb349dda0f477bb397015 to your computer and use it in GitHub Desktop.
Save sunnyone/f2b103d5647fb349dda0f477bb397015 to your computer and use it in GitHub Desktop.
webpack-dev-server proxy example
devServer: {
contentBase: 'dist',
host: '0.0.0.0',
port: 3000,
proxy: {
'/myapp/api': {
target: 'http://api-server:8080'
},
'/myapp': {
target: 'http://localhost:3000/examples/index.html',
pathRewrite: {'^.*' : ''}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment