Tuesday 30 May 2017

How to serve Django for an Electron app

I'm trying to create an Electron desktop app which has a Django application at its backend. There are several tutorials and blogs which mention how this can be achieved. I've tried those and it seems to be working, however there are some issues.

One of them for me is how to server Django in this case? For me the current way of doing it creates some unwanted delay making the app slow to start...

Generally, what needs to be done to create an Django/Electron app is to package (I'm using pyInstaller)the Django app into an stand-alone executable and then bundle that into an Electron app. The question is which server should be used for this case to server Django before packaging it with pyInstaller? At the moment I'm using cherryPy as a WSGI web server to serve Django.

However - is there a better alternative knowing that this will be used in an Electron desktop app? Maybe something faster, or more suitable for this task? What is the typical way of handling Django in this case?



via user1544500

No comments:

Post a Comment