How to start nodejs server from QT program?

  • Im working on QT program using nodejs (communicate by socket). How can I start nodejs server automatic with the QT application?

    I have installed 'forever' module to start node server easy.

    qt code:
    @QProcess p;
    p.start("cmd.exe", QStringList()<<"/C"<< qApp->applicationDirPath() + "/debugReq/startNode.bat");
    qDebug() << p.readAllStandardOutput();@

    I know this works because shows script's outputs.

    @forever start server.js@

    Server works when i run it by clicking startNode.bat file but when i run from QT it only show outputs but server doesnt start. What am i doing wrong?


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.