I have created a desktop app using react, nodejs, express and electron. What I want to add next is, to open it from a browser( like when we click on zoom or ms-teams link it prompts us to open a pre-installed desktop application). I want to add a similar functionality where I can open my desktop app from the browser link .I have searched for npm libraries that might help but couldn't find any.I am using yarn run dev
to run the app.
CodePudding user response:
npm install open
var opn = require('open');
open('http://Google.com');
CodePudding user response:
install open by using command npm install open
then require open
var open = require('open');
then open file
open('http://mozilla.com');