A simple project demonstrating how to spawn an Express app from Electron as well as providing server logs directly in the Electron app.
Express App:
Press 'F1' to show the server log:
We'll need a copy of the Node.exe
and Node.lib
:
https://nodejs.org/dist/v6.3.1/win-x64/ (or equivalent version for your system)
After downloading a copy of this repository place them in the root of the code folder.
When the Electron app starts it will spawn the Express app using an external copy of Node. This allows the Express app to run outside the Electron process.
The express-app
folder is just a vanilla Express generated app using
express-generator
.
- Clone the code repository.
- Open terminal to code repository.
- Make sure a copy of
Node.exe
andNode.dll
are copied to the root of the code repository. - Run
npm install
. - Change directories to the express-app folder and run
npm install
. - Change directories back to the root of the code repository.
- Run
npm start
to start the application.
Frank Hale <[email protected]>
9 August 2016
GNU GPL v3 - see LICENSE