CodeboxIDE / codebox

Open source cloud & desktop IDE
https://www.codebox.io
Apache License 2.0
4.12k stars 589 forks source link

Dart sample ECONNREFUSED #317

Open Rockfordal opened 10 years ago

Rockfordal commented 10 years ago

When i click run and the new tab to the running app opens

Error: connect ECONNREFUSED at errnoException (net.js:904:11) at Object.afterConnect as oncomplete

Terminal: Serving helloworld on http://localhost:2000
[Info from Dart2JS]:
Took 0:00:13.416970 to compile helloworld|web/helloworld.dart.
Build completed successfully

SamyPesse commented 10 years ago

The problem is that pub serveserve the http server on localhost and not 0.0.0.0. We can change the dart auto-run to not do a pub servebut pub build``and serve the build withpython -m SimpleHTTPServer ${PORT}``` or we can try to find a solution for doing some sort of port forwarding.

What do you think?

Cerebus commented 10 years ago

How about just adding "--hostname=0.0.0.0" to the dart pub serve runner?

kkruups commented 10 years ago

Hi Samy,

Can you make the change to you suggested in Mar 25? Please allow the user to configure the port. It doesn't make sense to hard code the port address. Maybe you can provide it as a config option.