You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can we integrate this project with sails so migrations run when we run sails lift?
I tried setting this in config/bootstrap.js:
var sailsMigrations = require('sails-migrations');
module.exports.bootstrap = function(cb) {
console.log('Performing Database Migrations');
sailsMigrations.migrate();
// It's very important to trigger this callback method when you are finished
// with the bootstrap! (otherwise your server will never lift, since it's waiting on the bootstrap)
cb();
};
but I get these errors:
error: The bootstrap function threw an error after its callback was called :: TypeError: Cannot read property 'http' of undefined
at Sails.getHost (/Users/josh/src/project/node_modules/sails/lib/app/private/getHost.js:11:43)
at Sails.bound [as getHost] (/Users/josh/src/project/node_modules/lodash/dist/lodash.js:729:21)
at Sails.getBaseurl (/Users/josh/src/project/node_modules/sails/lib/app/getBaseurl.js:19:20)
at Sails.bound [as getBaseurl] (/Users/josh/src/project/node_modules/lodash/dist/lodash.js:729:21)
at _printSuccessMsg (/Users/josh/src/project/node_modules/sails/lib/app/lift.js:63:56)
at sailsReady (/Users/josh/src/project/node_modules/sails/lib/app/lift.js:43:5)
at /Users/josh/src/project/node_modules/sails/node_modules/async/lib/async.js:251:17
at /Users/josh/src/project/node_modules/sails/node_modules/async/lib/async.js:154:25
at /Users/josh/src/project/node_modules/sails/node_modules/async/lib/async.js:248:21
at /Users/josh/src/project/node_modules/sails/node_modules/async/lib/async.js:612:34
at afterBootstrap (/Users/josh/src/project/node_modules/sails/lib/app/private/initialize.js:57:5)
at bootstrapDone (/Users/josh/src/project/node_modules/sails/lib/app/private/bootstrap.js:51:14)
at Object.module.exports.bootstrap (/Users/josh/src/project/config/bootstrap.js:22:2)
at Sails.runBootstrap (/Users/josh/src/project/node_modules/sails/lib/app/private/bootstrap.js:44:25)
at Sails.bound [as runBootstrap] (/Users/josh/src/project/node_modules/lodash/dist/lodash.js:729:21)
at Sails.initialize (/Users/josh/src/project/node_modules/sails/lib/app/private/initialize.js:48:9) [TypeError: Cannot read property 'http' of undefined]
/Users/josh/src/project/node_modules/sails/lib/hooks/cors/index.js:113
if (sails.config.cors.securityLevel > sails.hooks.cors.SECURITY_LEVEL_NORMAL) {
^
TypeError: Cannot read property 'SECURITY_LEVEL_NORMAL' of undefined
at Sails.<anonymous> (/Users/josh/src/project/node_modules/sails/lib/hooks/cors/index.js:113:63)
at emitNone (events.js:72:20)
at Sails.emit (events.js:166:7)
at Sails.emitter.emit (/Users/josh/src/project/node_modules/sails/lib/app/private/after.js:50:11)
at Router.flush (/Users/josh/src/project/node_modules/sails/lib/router/index.js:336:9)
at Router.bound (/Users/josh/src/project/node_modules/lodash/dist/lodash.js:729:21)
at Router.load (/Users/josh/src/project/node_modules/sails/lib/router/index.js:115:8)
at Array.bound (/Users/josh/src/project/node_modules/lodash/dist/lodash.js:729:21)
at listener (/Users/josh/src/project/node_modules/sails/node_modules/async/lib/async.js:490:46)
at /Users/josh/src/project/node_modules/sails/node_modules/async/lib/async.js:441:17
at _each (/Users/josh/src/project/node_modules/sails/node_modules/async/lib/async.js:46:13)
at Immediate.taskComplete (/Users/josh/src/project/node_modules/sails/node_modules/async/lib/async.js:440:13)
at processImmediate [as _immediateCallback] (timers.js:368:17)
The text was updated successfully, but these errors were encountered:
jbcpollak
changed the title
Add Grunt tasks to integrate with Sails lift
How to migrate when running sails lift?
Dec 11, 2015
How can we integrate this project with sails so migrations run when we run
sails lift
?I tried setting this in
config/bootstrap.js
:but I get these errors:
The text was updated successfully, but these errors were encountered: