Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

135
Visualizações
Webpack to run locally on a custom domain without socket issues

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:

  1. Press login button to yahoo (/auth)
  2. On server authenticate and send to callback URL (mywebsite.dev/callback)
  3. After agreeing with yahoo conditions I get rerouted to /callback and I can use the API just fine

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: error msg 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

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

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) { ...
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda