Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

barelyhuman/pui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Electron Routex

An attempt to get routex to work as a side worker with Electron to have a simpler client server approach in electron apps instead of an ipc arch

Motivation / Why ?

While I think electron's IPC is really well implemented, its a pain for a developer who has no idea of how IPC's work and ends up spending a lot of time trying to figure out the control flow of events.

I wanted to go with JSON RPC approach where a daemon listens for general network POST requests and the client can perform system level actions without actually having access to it.

Transmission uses this (kind off) and If I could get something similar working with routex then the user has a pretty easy way to write the server side of the electron app that's launched on side of the actual client view and the client developer can talk to the server by making simple fetch calls.

TODO

  • API requests from client to worker in bundled electron app
  • Figure out port automatically (harcoded to 3000 right now)
  • Worker alongside Electron to launch routex
  • End Worker when client closes
  • API requests from client to worker in unbundled electron app

Current Limitations

  • Haven't tested the whole flow with a bundled version of Electron yet.