Brief Question


I’m new to Electron, and I have a quick question.

Suppose I wanted to build an application that works on the web version and the client version. So would be (basically) the same as using the desktop application.

First, can I use PHP files from a web server to use as the files for the desktop application, or would there need to be separate files on the desktop? I’m actually trying to get away from PHP, and use only JS, but I’m not quite there yet.

I’m not really sure if this makes any sense or if this is a really ludicrous question to ask. Basically, let’s say I make app.php and host it on my web server. Would I be able to use that on my desktop application, and would it function the same way it would on the website?


If you don’t need to be offline-friendly, you can treat Electron like a web browser (it’s basically Chrome) and serve anything that your server can communicate. If you want the desktop version to work offline, you’ll have to figure out how to set up a Node-based server to serve PHP.


Thanks! That helps a lot :smiley: