My setup:
Using react-create-app using a proxy to use a server API with it. (Using create-react-app with a server)
Since Yahoo oAuth2 API does not allow localhost:**** or 127.0.0.1:**** in their URL callbacks link.
There for I have to first create a Nginx proxy to send localhost:3000 to port 80 and then I reroute localhost to -> mywebsite.dev
Alright, this setup works fine if I am using a simple node.js server:
But when using the create-react-app setup I am running into issues.
A)When starting the server everything work's fine, I go to mywebsite.dev but then I get this:
I get the error the webpack-dev-server is trying to listen to localhost:**** and since the url is mywebsite.dev it is giving this issue, and I am not able to fix it!
So the question is how to I let Webpack know that my local server is at mywebsite.dev not localhost:**** ?
Related : link 1 - simular issue, link 2 - node.js custom domain name
you can specify host while running web pack
webpack-dev-server --port 3000 --hot --host mywebsite.dev
or you can listen
var server = new WebpackDevServer(webpack(webpackConfig), {
...
});
server.listen(port, "mywebsite.dev", function(err) { ...