Minimal example of running a Koa app from within Electron, for creating multi-platform distributable executables.
The Koa app is trivially simple (just a single page, using koa-router and koa-handlebars to ensure such basic architecture works). Replace the app with your own! (Note using NAN – native abstractions – will probably make life harder).
git clone https://github.com/chrisveness/electron-koa-app.git
cd electron-koa-app
npm install
cd app
npm run start-dev
and open localhost:3000
in your browser.
npm start
npm run build -- --win --x64
which generates a setup file in the dist\win
directory (only tested on Windows for Windows).
Thx to JDM, eriedl, electron-builder.
Koa and Electron are still both rather moving targets. This was developed with Koa v1.2.4 and Electron v1.4.2, electron-builder v7.10.2.