Is it possible to make an Electron JS desktop app that is a web server, so that when we start the app the server will also start and we can access it from other computer within the same network/LAN?
Asked
Active
Viewed 1,947 times
6
-
1Why not? HTTP is a native module in NodeJS so you can import in electron with no problem. Have you tried something? – MadPapo Oct 02 '18 at 07:44
-
I have made a server with node js and will implement a express js web app. I am thinking to make Electron app for installing the server(with node js and my express app/dependency install) in the system and when user will start the electron app the server will start and other system can access it with browser. But I am not sure about It will allow users to access there Printer/Scanner/Barcode Scanner through web browser. Any idea? – Shashank Oct 02 '18 at 08:39
-
Any luck with this @Shashank, I am trying to do something similar too. Not sure if something like "make an electron app accessible over LAN" is possible. – Bk Baba Oct 17 '18 at 06:18
-
1@BkBaba, yes I have developed it successfully, I have made an Electron desktop app which starting a server in system (LAN) and inside it I am using Express for API. And I have made a client side desktop app in electron which is calling server API's. Also for making system IP(server) static I have made entry in router with system(server) mac address to allot it static IP. – Shashank Dec 29 '18 at 06:59
1 Answers
0
Yes, it is.
Yout can run you server (express or just bare http
/https
/http2
) on main process.
Also you can child_process.fork()
or child_process.spawn()
. It works fine.

sanperrier
- 606
- 5
- 12