Created
August 14, 2016 00:59
-
-
Save tastywheat/f08a3bdc757f254093bbcc7b96e5394f to your computer and use it in GitHub Desktop.
express proxy to webpack server
This file contains hidden or 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
var app = express(); | |
// proxy the request to webpack server | |
app.use(proxy(url.parse('http://localhost:3000'))); | |
app.listen(3001, function (err) { | |
if (err) { | |
console.error(err); | |
} else { | |
console.log('proxy listening on 3001'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment