2
I wonder if there is any possibility to compile the Electron and Executable open the files as HTTP server instead of running them as file:// I am trying to access a web page that does not accept request for domains file:// so I need mine. EXE run the files as http:// it is possible to compile Electron as if it were running in Dev ?
Do you have Node.js? You could mount a simple server with Node. Simpler.
– Sergio
I need it to be via Electron pq mount Node server on the user at the time of running it would mto work.
– Gabriel Miranda Lyra
@Sergio Electron has built-in Node. It’s simply a matter of starting a server, and the other side of Electron accessing. Gabriel, to my knowledge, Electron does not restrict the protocol to
file://
, can usehttp://
if this points to an existing resource (be served by the internal Node of Electron, be an external website).– bfavaretto
@bfavaretto interesting, use the eletron for end-to-end testing, but never used alone so.
– Sergio
@bfavaretto then, in case the files are compiled into one . asar and at the time I will run the EXE generated by Packer it accesses the files as file:// and as I did not want Electron to access an external Node on the web (to avoid server cost) I wanted to know if I can run the Electron dev environment (usually creates an http server) in production.
– Gabriel Miranda Lyra