electron-crey-quark

Backend http web server for electron

Usage no npm install needed!

<script type="module">
  import electronCreyQuark from 'https://cdn.skypack.dev/electron-crey-quark';
</script>

README

quark

Backend http web server for Electron applications

const quark = require('electron-quark');

Usage

Create a quark server in your electron main process

quark({
    port: 9999,
    dir: __dirname,
    description: main
});

The quark server will serve static files from the directory specified. You can load them into a broswer window by using the quark.url() method.

let mainWindow

function createWindow() {
    mainWindow = new BrowserWindow({ width: 600, height: 400});
    mainWindow.loadURL(quark.url('index.html'));
}