niutech / node.php

Run node.js apps from PHP even on a shared hosting!
813 stars 236 forks source link

Couldn't connect to host #19

Closed timreichen closed 3 years ago

timreichen commented 8 years ago

The demo link in the readme has the same problem as I have on my server. I can install and start the server but when I set the node.php?path=xxx it tells me the following error:

Error requesting xxx: couldn't connect to host.

How to solve this error?

w3adventures commented 8 years ago

I belive this issue is connected to hosting service. Sometimes when I visit http://juvenia.info/node_modules/jt-js-sample/ it shows Error: couldn't connect to host But after refreshing few times it shows basic Node.php info: Hello from node.js on PHP shared hosting!

On my test Node.php here http://nodejs.w3adventures.com/ it works fine. In past 20 days I just had to restart node server one time. Routing works fine like this http://nodejs.w3adventures.com/?path=xxx and also http://nodejs.w3adventures.com/xxx because of htaccess usage.

timreichen commented 8 years ago

Thanks for your answer. I could not make it work for now. Could you post the example project source somewhere?

w3adventures commented 8 years ago

All files can be downloaded here. CSS and frontend JavaScript are in root css and js folder while backend files are in _nodemodules/nodejs/ containing main index.js and EJS templates in views folder.

niutech commented 8 years ago

Please check the new Troubleshooting section of README