What does ./
mean? I assume that it is used to search a path, but I am not sure if that is true. I know that, for example, in C# if I want to search a path I can use ../../file.exe
.
Currently what I want is to run a command in node.js
from my application in NW.js
with the following code:
var exec = require('child_process').exec;
exec('node ./server.js', function(error, stdout, stderr) {
console.log('stdout: ', stdout);
console.log('stderr: ', stderr);
if (error !== null) {
console.log('exec error: ', error);
}
});
However, the code above does not produce the desired results. I believe it is because I don't know how to search the path of server.js
that I want to run.