Created
April 30, 2016 20:46
-
-
Save gregorskii/3c4556f3566a4c2a7a35d586b5a274ff to your computer and use it in GitHub Desktop.
Proxy Middleware example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import proxyMiddleware from 'http-proxy-middleware'; | |
config.browserSyncConfig = { | |
proxy: { | |
target: '<DEST SITE>', | |
middleware: [proxyMiddleware(['<API PATH>'], {target: '<API TARGET>'})] | |
} | |
}; | |
plugins.browserSync.init(config.browserSyncConfig); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment