Disable browsers from access to electron / express application


I have an express server that serves my angular front end at http://localhost:9000

I’m using electron as a desktop client.

I want to force users to view the application through electron and only through electron. I don’t want users to have the ability to browser the application through any other browser.

Is there any way to disable the ability to access the app through a regular browser?

I’ve attempted to find information regarding this but have come up short.



 if (window.process && window.process !== undefined) { 
       // Likely electron 


Can you explain how that solves anything?


Yeah, so with that I’m able to check whether the client is an ‘electron type’ client or a typical browser. From there I can do whatever I need to if it’s not an electron client (redirect, welcome state etc…)