文件名称:电子服务:为电子应用提供的静态文件
文件大小:10KB
文件格式:ZIP
更新时间:2024-02-25 17:26:56
electron nodejs server single-page-app npm-package
电子服务 适用于Electron应用程序的静态文件服务 通常,您只需要使用win.loadURL('file://…') ,但是当您制作单页Web应用程序时(这是当今大多数Electron应用程序所使用的)作为 '无效 ed URL在磁盘上不存在。 如果文件存在,它将提供文件;如果文件不存在,它将退回到index.html ,这意味着您可以使用 , 等路由器模块。 安装 $ npm install electron-serve 需要Electron 8或更高版本。 用法 const { app , BrowserWindow } = require ( 'electron' ) ; const
【文件预览】:
electron-serve-main
----index.test-d.ts(251B)
----.gitattributes(19B)
----.github()
--------funding.yml(91B)
--------workflows()
----license(1KB)
----test()
--------fixture-404-error.js(272B)
--------index.html(106B)
--------fixture-on-ready.js(244B)
--------index 1.html(106B)
--------test.js(2KB)
--------fixture.js(262B)
--------fixture-dir-fallback.js(273B)
--------fixture-encoded-uri.js(269B)
--------package.json(3B)
----index.d.ts(1KB)
----.npmrc(19B)
----.editorconfig(175B)
----.gitignore(23B)
----index.js(2KB)
----readme.md(3KB)
----package.json(855B)