Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/hooks/http/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ module.exports = function(sails) {
// Port to run this app on
port: 1337,

// How long before warning Sails is taking too long to lift.
liftTimeout: 4000,

// SSL cert settings end up here
ssl: {},

Expand Down
5 changes: 1 addition & 4 deletions lib/hooks/http/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ module.exports = function (sails) {

// Used to warn about possible issues if starting the server is taking a long time
var liftAbortTimer;
var liftTimeout = sails.config.liftTimeout || 4000;
// TODO: pull this defaulting into `defaults`
// and also ensure this config is properly documented.

async.auto({

Expand All @@ -40,7 +37,7 @@ module.exports = function (sails) {
}

// Start timer in case this takes suspiciously long...
liftAbortTimer = setTimeout(failedToStart, liftTimeout);
liftAbortTimer = setTimeout(failedToStart, sails.config.liftTimeout);

// If the server fails to start because of an error, or if it's just taking
// too long, show some troubleshooting notes and bail out.
Expand Down