Edit Page
sails.lower()
Shut down a lifted Sails app and have it cease listening for or responding to any future requests.
sails.lower(callback);
Usage
|
Argument |
Type |
Details |
1 |
callback |
|
Optional. A function to call when lowering is complete (or if an error occurs) |
Callback
|
Argument |
Type |
Details |
1 |
err |
|
An error instance will be sent as the first argument of the callback if any fatal errors occurred while lowering. |
Example
sailsApp.lower(
function (err) {
if (err) {
return console.log("Error occurred lowering Sails app: ", err);
}
console.log("Sails app lowered successfully!");
}
)
Notes
- The app will emit the
lower
event before shutting down the HTTP and WebSocket services.
- Lowered apps cannot be lifted again.
Is something missing?
If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.