Skip to content

chrisveness/electron-koa-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3846d1d · Oct 7, 2016

History

14 Commits
Oct 7, 2016
Oct 7, 2016
Sep 23, 2016
Oct 7, 2016
Oct 7, 2016

Repository files navigation

Electron Koa App

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).

Setup

git clone https://github.com/chrisveness/electron-koa-app.git
cd electron-koa-app
npm install

To run the app in browser

cd app
npm run start-dev

and open localhost:3000 in your browser.

To run the app in Electron

npm start

To build a stand-alone Windows executable

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.