Follow this guide to help you migrate your reload use across major versions.
- Reload officially removed support for the
server
argument deprecated in Version 2. If you supply the server argument to reload the promise will reject and return an error. - Reload now uses promises:
- To call Reload you should use a
then/catch
to call reload.-
reload(app).then(function () { // Reload started }).catch(function (err) { // Reload did not start correctly, handle error })
-
- If you are in an asynchronous function you can call Reload with await
-
async function asyncCall() { try { var reloadReturned = await reload(app) } catch (err) { // Handle error } }
-
- To call Reload you should use a
- Reload no longer supports Node versions 4, 5, 6, 7, 8, or 9. Although older versions of node like version 8 may work with Reload it is recommended to use a Node version officially supported.
Reload dropped support for server. The only required parameter for reload is app
.
-
Upgrade with required arguments:
reload(server, app)
becomesreload(app)
-
Upgrade with required arguments and the one optional argument:
reload(server, app, true)
becomesreload(app, {verbose: true})
To read more about the API breaking changes please refer to the changelog.