Answers for "nodejs opening a browser"

2

nodejs open default browser on specific web page

$ npm install opn

//////////////////////////////////////////

var opn = require('opn');

// opens the url in the default browser 
opn('http://sindresorhus.com');

// specify the app to open in 
opn('http://sindresorhus.com', {app: 'firefox'});
Posted by: Guest on May-25-2020

Code answers related to "nodejs opening a browser"

Code answers related to "Javascript"

Browse Popular Code Answers by Language