From 235ae0989fb143be15eb413577e76b15bb6d90a4 Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Sat, 12 Aug 2017 12:48:49 +0200 Subject: [PATCH] Mention that the app needs to check for updates --- docs/tutorial/updates.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/tutorial/updates.md b/docs/tutorial/updates.md index 48a6b0fb4693..6235d5cbea87 100644 --- a/docs/tutorial/updates.md +++ b/docs/tutorial/updates.md @@ -22,17 +22,21 @@ Once you've deployed your update server, continue with importing the required mo const { app, autoUpdater } = require('electron') ``` -Next, put together the URL of the update server: +Next, put together the URL of the update server and tell [autoUpdater](../api/auto-updater.md) about it: ```js const server = const feed = `${server}/update/${process.platform}/${app.getVersion()}` + +autoUpdater.setFeedURL(feed) ``` -As the final step, tell [autoUpdater](../api/auto-updater.md) where to ask for updates: +As the final step, check for updates (the example below will check every minute): ```js -autoUpdater.setFeedURL(feed) +setInterval(() => { + autoUpdater.checkForUpdates() +}, 60000) ``` That's all. Once [built](../tutorial/application-distribution.md), your application will receive an update for each new [GitHub Release](https://help.github.com/articles/creating-releases/) that you create.