6

I am building a desktop app in HTML, CSS and typescript with Brackets core. My question is: is it possible to run a command with Node.js? I want to go to CD into a directory and then run grunt serve.

I have searched Google and the Node site, but couldn't find anything.

Thanks you

Sven

1
  • Have a look at the spawn function in the child_process module. Commented Sep 21, 2014 at 20:54

1 Answer 1

11

http://nodejs.org/api/child_process.html

child_process.exec('shell command', {cwd: 'current work dir'}, function(err, stdout, stderr) {});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.