My question is simple : I have a program written in nodejs and want to run it in an infinite loop in the language bash, is this possible?


no problem

while true
    node <myapp>

you can also use it as a one liner while true; do; node <myapp>; done;

  • My program is called main.js, to run it i should do: while true; do; node <main.js>; done; ? – D4IVT3 Nov 4 '15 at 16:08
  • by convention when you specify something inside <> it must be replaced by the real name – alexises Nov 4 '15 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.