How updating works

The server automatically checks for updates every fifteen minutes. This is of course, configurable. That's what this document explains.

The update server is GitHub. The nodeStorage repo as the official release version.

When there's a new version your server will automatically update itself, unless you've configured it not to. However it will not automatically restart. You can set it up so it does. See the section below.

How to configure updates

You can configure the updates through config.json by specifying a top-level object named updates. It has three optional elements, enabled, fnameStorageJs and ctMinutesBetwChecks.

If enabled is false, it won't check for updates.

If you've changed the name of storage.js, set fnameStorageJs to the name of the file (that's the file it will update). I like to change the name so if I'm running more than one instance of the storage server on a system I can tell which is which when looking at a forever list.

Change ctMinutesBetwChecks if you want it to check more or less frequently.

Automatic restart on change

You can set it so that your server automatically quits when there's been a change to a file you can specify. If you're running a utility like forever, it can then relaunch the server.

Turn the feature on with flWatchAppDateChange. And specify the file it should watch with fnameApp.


Here's an example of a config.json that has an updates object and automatically restarts when there's a change to the main JavaScript file.

Last built: Thu, Jun 2, 2016 at 7:32 AM

By Dave Winer, Wednesday, March 30, 2016 at 10:55 AM. Don't slam the door on the way out.