Skip to content

Latest commit

 

History

History
18 lines (10 loc) · 790 Bytes

README.md

File metadata and controls

18 lines (10 loc) · 790 Bytes

Simple SvelteKit/Electron App with Node Adapter

This app takes a basic SvelteKit app and uses the build output from the node adapter to run the site as an Electron app.

Basic set-up

The node adapter for SvelteKit outputs to a build folder.

The index.cjs file imports the index.js starting point from the build server, then checks the server is running and loads the home page for the app.

File modification in build output (not required, but good for logging)

In the build folder index.js file:

  1. Add to top of file: "import log from 'electron-log'"
  2. Modify server.listen() console log (~line 244) to "log.info()" vice "console.log()".

See electron-log ReadMe for details on where logs are stored and use.