Npm script, Electron and environment variables

In short

In app:

var isDev = process.env.TODO_DEV ? process.env.TODO_DEV.trim() == "true";  

In package.json let's say we have:

"start": "electron . --enable-logging --remote-debugging-port=9222"

With cross-env package:

"dev": cross-env TODO_DEV=true npm run start

or without dependencies:

"dev:mac": TODO_DEV=true npm run start,
"dev:win": SET TODO_DEV=true && npm run start

Longer version

If you're working with npm scripts (or

Read More

Auto-update failing on Mac OS


Try looking at response from server particularly Content-Length.

Longer version

I've been asked couple of times and also experienced failure with auto-updater on Mac OS. I've set correct URL, and tested it with curl and directly in browser and got response from server (both 200 and 204).

But somehow I kept getting error event from auto-updater. By investigating some more, it turned out to be problem in response

Read More