0

I have a React app, to run it locally I use webpack-dev-server. This is how my command looks like:

"scripts": {
    "dev-server": "webpack-dev-server --config ./webpack.dev.js --open --https --hot --history-api-fallback",
  }

When I do npm run dev-server it opens a browser for me with url "https://localhost:8080/".

Is it possible to map it somehow to "https://localhost" (without the port)?

Anna Miroshnichenko
  • 1,143
  • 1
  • 7
  • 24
  • Please see the related thread for answers: https://stackoverflow.com/q/33272967/3679048 – Danish Jun 15 '20 at 02:31
  • 1
    Actually I tried it. If I run it with the following. arguments: "webpack-dev-server --config ./webpack.dev.js --host 0.0.0.0 --port 80 --open --https --hot --history-api-fallback" (as mentioned in that answer) the following URL is opened "https://0.0.0.0:80/" and I need to have the link "https://localhost" (for consistency purposes for my project) – Anna Miroshnichenko Jun 15 '20 at 21:42
  • Port 80 is default port it should be reachable via localhost itself, if I am not wrong. – Danish Jun 15 '20 at 22:17

0 Answers0