Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

134
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!