0

I have a Vue.js app and a Node server running, I want click a button that sends a request to my Node server and opens up Chrome. I know it's possible to open up the application by passing

'open -a "Google Chrome" http://your_url'

to the function, but is it possible to open up an HTML file on the server with that command? If so, how?

afryingpan
  • 343
  • 6
  • 15
  • Well I guess I could pass it the file path url, I'll try that right now, I was just being lazy I guess by asking you guys first. Edit: Yup that works, nevermind – afryingpan Oct 25 '18 at 05:43
  • This is a duplicate question, you can find solution [here](https://stackoverflow.com/questions/7664605/how-would-you-launch-a-browser-from-the-a-node-js-command-line-script) – sorabh86 Oct 25 '18 at 05:57
  • @sorabh86 this looks like a nice library for a better a solution. Thank you – afryingpan Oct 25 '18 at 06:15

1 Answers1

0

So I stopped being lazy and tried it myself, should've tried before asking. Just pass the url of the file location to the command instead of the website.

afryingpan
  • 343
  • 6
  • 15