
Hazel: Lighweight update server for Electron apps - nozzlegear
https://github.com/zeit/hazel
======
dmitrygr
A philosophical question: how does the author reconcile his source code being
full of ".js" files and saying "lightweight" with a straight face?

.

And a more practical one: do they not teach people about how power management
works anymore? Who thinks this is a good idea...?

    
    
      Refreshes the cache every 15 minutes (use INTERVAL environment value for custom number of minutes - more)
    

Do you update your app every 15 minutes? And are you presumptuous enough to
assume your users need each update immediately? Maybe you simply just not care
for users' devices' battery lives? If you really insist on the NIH approach to
updates, check at app launch time, or once every 24 hours at most for long-
running apps..

and then

    
    
      Automatically detects the platform/OS of the visitor by parsing the user agent
    

When did it become OK to trust user agent strings for feature or device
detection?

~~~
r1ch
As far as I understand it the cache is a server-side thing, so the update
server is polling github every 15 minutes, not the Electron app.

~~~
dmitrygr
if it runs remotely, then why doesn’t the app just pull from github directly.
why an intermediary? something doesn't add up

~~~
mcbits
If your app ever gets popular and causes unreasonable traffic to your GitHub
repo, or if GitHub decides they hate you for any other reason, your app will
work only by GitHub's mercy and generosity.

------
OJFord
Nothing about this seems to be 'for Electron apps'?

It just sits between the app looking for an update and Github releases;
returns the latest release if newer than a supplied version number assumed to
be the current.

Is it really so bad to have that `if latest.version > version` logic in the
app itself, and download directly from Github?

Github releases are presumably pushed over a CDN and already well-cached - and
almost certainly have better up-time than someone running an instance of this
somewhere, which of course is still potentially victim to Github's down-time.

Have I missed something? What's the point?

------
esonderegger
If this works as described, it will be a lifesaver.

I've been running nuts on Heroku for my Electron app and never got it fully
working. (It was very good at being able to tell there was an update
available, but performing the update wouldn't work)

Does it work for Linux AppImage installs?

~~~
r1ch
This doesn't seem to do any actual updating, it just tells the client the
download URL of the latest github release.

------
nilved
Why does every app need its own auto-updater instead of using the OS?

~~~
slimsag
Does windows provide an updater for apps..? I bet they don't on XP or 7, which
are still highly used.

Also, I bet it's far easier to write an auto-updater than it is to figure out
each OS's update method (building a deb,rpm,etc)

~~~
stephenr
> I bet it's far easier to write an auto-updater than it is to figure out each
> OS's update method (building a deb,rpm,etc)

Write some POS 'blindly overwrite files, no you can't downgrade, what do you
mean "changelog"' updater?

Sure, I bet you can do.

Write something that handles user preferences, changed config files, conflicts
etc as well as apt/dpkg? I doubt it.

------
xpaulbettsx
For Windows, you can literally just type `now` in the Releases directory. No
micro server needed. Great project though, sorry all those years ago I
couldn't convince the Squirrel.Mac folx to do it my way.

------
etienne_ad
I have been looking for something that combines this and something for Cordova
like m$ codepush all in one any ideas?

------
jimpick
Nice!

