Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
BeforeAll(function(done) {
// Tests expect to run with NODE_ENV=development
process.env.NODE_ENV = 'development';
sails.lift({
// Your sails app's configuration files will be loaded automatically,
// but you can also specify any other special overrides here for testing purposes.
// For example, we might want to skip the Grunt hook,
// and disable all logs except errors:
hooks: { grunt: false },
log: { level: 'info' },
}, done);
});
rc = require('rc');
} catch (e0) {
try {
rc = require('sails/node_modules/rc');
} catch (e1) {
console.error('Could not find dependency: `rc`.');
console.error('Your `.sailsrc` file(s) will be ignored.');
console.error('To resolve this, run:');
console.error('npm install rc --save');
rc = function () { return {}; };
}
}
appInsights.start();
// Start server
sails.lift(rc('sails'));
// Start sails and pass it command line arguments
require('sails').lift(require('optimist').argv);
// Start sails and pass it command line arguments
require('sails').lift(require('optimist').argv);
// Start sails and pass it command line arguments
require('sails').lift(require('optimist').argv);
// lift sails
require('sails').lift();
before(function (done) {
this.timeout(5000);
var config = {
log: {
level: 'error'
}/*,
connections: {
default: 'localDiskDb'
}*/
};
Sails.lift(config, function (err, s) {
if (err) return done(err);
console.log('sails lift\n');
global.sails_app = s.hooks.http.app;
done();
});
});
before(function(done) {
this.timeout(5000);
Sails.lift({
port: 8989,
log: {
noShip: true
},
hooks: {
grunt: false
},
models: {
connection: 'localDiskDb',
migrate: 'drop'
}
}, done);
});
beforeAll(function(done) {
Sails.lift(rc("sails"), function(err, sails) {
done && done(err, sails);
});
});
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
* If your software can interact with users remotely through a computer
* network, you should also make sure that it provides a way for users to
* get its source. For example, if your program is a web application, its
* interface could display a "Source" link that leads users to an archive
* of the code. There are many ways you could offer source, and different
* solutions will be better for different programs; see section 13 for the
* specific requirements.
**/
require('sails')
.lift(require('optimist').argv);