Launch nodejs from Qt5 application
-
wrote on 26 Jun 2016, 16:19 last edited by
I have a nodejs application which works fine if launched directly from console.
If I try to start it using QProcess::start (or even startDetached) in this way:m_process->start("nodejs", QStringList() << "/home/pi/server.js");
it seems to start, I see the relevant processes in background but it doesn't really work.
Because it works if started with the same command from console I'm sure the nodejs code itself is ok.
The problem seems te be related to QProcess but I don't know in which way (especially when using startDetached!).Does anybody have some experience about this?
-
I have a nodejs application which works fine if launched directly from console.
If I try to start it using QProcess::start (or even startDetached) in this way:m_process->start("nodejs", QStringList() << "/home/pi/server.js");
it seems to start, I see the relevant processes in background but it doesn't really work.
Because it works if started with the same command from console I'm sure the nodejs code itself is ok.
The problem seems te be related to QProcess but I don't know in which way (especially when using startDetached!).Does anybody have some experience about this?
wrote on 26 Jun 2016, 16:51 last edited by@Mark81 In detail it do all the stuff but doesn't provide the html pages.
It's an application like this:https://github.com/sabhiram/raspberry-wifi-conf
which enables hostap, etc... everything ok, but when requested the web pages are not served.
-
Hi,
Did you check the standard output and standard error channels provided by QProcess ? There might be messages in there that will help find what's going on.
-
Hi,
Did you check the standard output and standard error channels provided by QProcess ? There might be messages in there that will help find what's going on.
-
Do you have any logging going on that would allow you to check whether your nodejs server does something ?
4/5