npm run docker:dev can't request to localhost
See original GitHub issueI use Laravel as backend, laradock initializes the docker environment.
Run npm run docker: dev (use proxy and run start: no-mock
) error:
[HPM] Error occurred trying to proxy request / api / auth / login from localhost: 8000 to http: //localhost / (ECONNRESET) (https://nodejs.org/api/errors.html#errors_common_system_errors).
note: localhost
: server backend using laravel
I don’t know what the error is and how to fix it.
If you don’t use docker and run npm run start: no-mock
everything back to normal, I’m thinking that there is a problem with the network between containers, I’m not good, please help me
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
nodejs app doesn't connect to localhost when running within a ...
Running npm start on command line launches the app successfully on the browser as I'm able to go to localhost:4200 and see the...
Read more >How to reach localhost on host from docker container?
Situation: I run a NodeJS app with the monero-javascript library to connect to a localhost monero-wallet-rpc running on my host OS. Problem: I ......
Read more >Previewing running applications in the AWS Cloud9 ...
0.1 , localhost , or 0.0.0.0 . However, if you don't do so, you can't preview your running application from within the IDE....
Read more >Dockerizing a Node.js Web Application - Semaphore Tutorial
“Docker is an open platform for building, shipping and running distributed applications. It gives programmers, development teams and operations ...
Read more >Localhost Refused to Connect Error: 5 Confirmed Ways to Fix It
It is a common error that can happens when working on local machines. The localhost simulates a web server running on your computer....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can use
Docker run --net=host
to share the network. The default bridge mode will generate an ip address for each dockerin docker-compose ,you can set
network_mode: host
@bartimaeus list container: I tried with external_links but failed, my container list above, I wrote external_links how it works, thank you