0

With an http server made in nodejs can I have it run another nodejs module like jasmine-node, that normally runs in command line, output to the web?

Trying to run jasmine tests from browser instead of command line, new to nodejs.

1 Answer 1

0

you could have 2 node instances. One the http server and the second instance the command line instance to run jasmine. The http server instance would spawn the command line instance. Then you could register a GET route on the http server such as someexample.com/runtests which would call the tests and wait for the tests to finish and respond with the console output. This is sort of unorthodox, but there wouldn't be a direct way to run command line applications through the browser without modifying their source.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, thats a bummer, I was hoping because they were both nodejs one could spawn the other more directly and pipe the output. Thanks, I'll use your suggestion and found this link on command line interaction stackoverflow.com/questions/8389974/…

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.