John Wick
John Wick

Reputation: 447

Electron for only front end

I am trying to make my web application into a desktop app. I have already built and configured a server to host the backend scripting written in python.

My front end is written in JS, JQuery, HTML, CSS.

I have found an open source framework called Electron that packages web apps into desktop apps. Can I implement this so that it only wraps around my front end components without having to alter my back end server?

Upvotes: 1

Views: 1685

Answers (1)

Brian Wright
Brian Wright

Reputation: 877

In essence, yes you can use your current web code to create a desktop app using Electron, as Electron in essence is basically just a simplified browser. However, you will need to add some things to your project if they don't already exist in order for Electron to work.

3 things in particular:

(See the quick start guide: https://electron.atom.io/docs/tutorial/quick-start/)

  1. package.json
  2. main.js
  3. index.html

You'll also need nodejs installed as electron itself is an npm module.

So not quite as straightforward as you may have thought but definitely a fairly simple and viable approach.

Upvotes: 1

Related Questions