Edit Page
sails.lower()
Shut down a lifted Sails app and have it cease listening for / 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
- After an app is successfully lowered, it will emit the
lowered
event.
- 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-docs repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.