Julian
Julian

Reputation: 423

Is it possible to open the frontend of an electron app in a webbrowser?

I just started to play around with electron. It works very well and i like it a lot. I like the fact that I can easily package a node application for all operating systems. I am now wondering if it is somehow possible to be able to display the frontend in a browser. So that the main application is the electron app, which also has the main frontend. But it should also be possible to look into the application in the local network using a browser. Is that possible somehow? Many thanks for the help.

And please excuse my bad English;)

Upvotes: 1

Views: 1286

Answers (1)

Darren Cook
Darren Cook

Reputation: 28913

You could have your "main" application thread start a web server, listening on e.g. port 8080, and not even bother opening a renderer thread. But there is little point using Electron in this case - the packaging you mention is about the only benefit.

Not quite what you are asking for, but Quasar Framework can target both web apps and electron apps (and mobile, etc.) from the same codebase. From experience we try to do the maximum we can in the webapp, the common denominator, and then give the Electron users an enhanced experience (e.g. a proper save-as dialog box that is allowed to see the whole file system).

Upvotes: 1

Related Questions