6

I searched a lot but till now could not find anything. I have one ps1 file and from there i want to run node js file.Is this possible ?

1 Answer 1

8

Yes, Possible. Put the below code in .ps1 file:

node /path/to/file.js

or

node /path/to/file.js &        # for daemon
Sign up to request clarification or add additional context in comments.

3 Comments

Additionally, one can add arguments as follows node /path/to/file.js -f "C:/path/to/file.txt -c in case the .js script accepts arguments like a commander script.
how to stop existing powershell running script ?
by finding process ID and stop it. Stop-process -Id processId

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.