electron-protocol-serve
A file protocol that serves any existing file in a directory and redirects everything not found to index.html.
Made for ember-electron.
Usage
If you want to use it directly, you may do so at your own risk. Remember to register protocols and schemes before
app.on('ready')
.
In your electron.js
file:
const app protocol BrowserWindow = ;const protocolServe = ; // Create the protocolconst filePath = 'path/to/your/dist/folder';const protocolServeName = ; // The protocol we created needs to be registeredprotocol; // After registering protocol and schema, you can use it to serve your app to your windowapp;
API
See index.js
.
Credits
- @pichfl Initial protocol
- @bendemboski Testing, idea for extraction