Answer the question
In order to leave comments, you need to log in
Is it possible to run a Node.js program without a terminal window?
When a Perl or Python program is run with wperl or pythonw, it runs without a terminal window (command prompt window) appearing. Is there a similar way to run Node.js programs (under Windows)?
Answer the question
In order to leave comments, you need to log in
Like any console program, there are options here: superuser.com/questions/62525/run-a-batch-file-in-...
Or there is this RunAsService program: runasservice.sourceforge.net
#include <windows.h>
int APIENTRY WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow
)
{
WinExec(lpCmdLine,0);
return 0;
}
You can make a text file with a script and run a node project in invisible mode.
start.vbs file
Dim objWshShell, lc
set objWshShell = WScript.CreateObject("WScript.Shell")
lc = objWshShell.Run("node app.js", 0, false)
set objWshShell = nothing
Thank you. Interestingly, one of the tips from the link is to use pythonw with a script to run cli programs without a terminal) So, as far as I understand, there is no native tool, do I need to add one more link to the chain? Sorry if so. I wonder why the developers didn’t bother with such a tool already familiar to Perl and Python ...
Probably, in extreme cases, you can slightly redo the script and run node-webkit with the show: false field in the manifest, but this is also a crutch for a simple system utility.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question