Electron 如何从URL加载电子应用程序

Electron 如何从URL加载电子应用程序,electron,Electron,使用无效选项运行electron时,我得到: A path to an Electron app may be specified. It must be one of the following: - index.js file. - Folder containing a package.json file. - Folder containing an index.js file. - .html/.htm file. - http://, https://, or f

使用无效选项运行electron时,我得到:

A path to an Electron app may be specified. It must be one of the following:
  - index.js file.
  - Folder containing a package.json file.
  - Folder containing an index.js file.
  - .html/.htm file.
  - http://, https://, or file:// URL.
如果我尝试从文件系统加载,使用“
electron.
”它会加载我的应用程序,但是如果我使用nginx或node-serve服务同一目录,并尝试使用“
electron”对其运行electronhttp://localhost:3000/
“它会加载一个空白屏幕,或者如果我在路径中添加文件名,则会加载该文件的内容

是否可以从electron中的URL加载应用程序?如何运行?

Electron无法从URL运行“Electron应用程序”

当我们加载一个远程URL(在本例中是一个http://URL)时,我们根据我们的请求禁用节点集成