{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/sails/issues/3239","labels_url":"https://api.github.com/repos/balderdashy/sails/issues/3239/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails/issues/3239/comments","events_url":"https://api.github.com/repos/balderdashy/sails/issues/3239/events","html_url":"https://github.com/balderdashy/sails/issues/3239","id":106929034,"number":3239,"title":"How to get the `sailes.config.*` in the services?","user":{"login":"imfly","id":12215508,"avatar_url":"https://avatars.githubusercontent.com/u/12215508?v=3","gravatar_id":"","url":"https://api.github.com/users/imfly","html_url":"https://github.com/imfly","followers_url":"https://api.github.com/users/imfly/followers","following_url":"https://api.github.com/users/imfly/following{/other_user}","gists_url":"https://api.github.com/users/imfly/gists{/gist_id}","starred_url":"https://api.github.com/users/imfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imfly/subscriptions","organizations_url":"https://api.github.com/users/imfly/orgs","repos_url":"https://api.github.com/users/imfly/repos","events_url":"https://api.github.com/users/imfly/events{/privacy}","received_events_url":"https://api.github.com/users/imfly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-17T07:51:24Z","updated_at":"2015-09-17T14:12:50Z","closed_at":null,"body":"Hi, \r\nIt runs well in `dev`, but I find an error when execute `sails www --prod`.\r\n\r\nThe logs:\r\n\r\n```\r\nuser@debian:~/$ sails www --prod\r\n/path/to/project/node_modules/sails-permissions/node_modules/sails-auth/api/services/passport.js:281\r\n  var strategies = sails.config.passport;\r\n                   ^\r\nReferenceError: sails is not defined\r\n    at Authenticator.passport.loadStrategies (/path/to/project/node_modules/sails-permissions/node_modules/sails-auth/api/services/passport.js:281:20)\r\n    at Authenticator.bound [as loadStrategies] (~/.npm/lib/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21)\r\n    at Hook.initialize (/path/to/project/node_modules/sails-auth/api/hooks/sails-auth.js:4:31)\r\n    at Hook.bound [as initialize] (~/.npm/lib/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21)\r\n    at /home/kuby/.npm/lib/node_modules/sails/lib/hooks/index.js:75:14\r\n    at /home/kuby/.npm/lib/node_modules/sails/node_modules/async/lib/async.js:451:17\r\n    at /home/kuby/.npm/lib/node_modules/sails/node_modules/async/lib/async.js:441:17\r\n    at _each (~/.npm/lib/node_modules/sails/node_modules/async/lib/async.js:46:13)\r\n    at Immediate.taskComplete (~/.npm/lib/node_modules/sails/node_modules/async/lib/async.js:440:13)\r\n    at processImmediate [as _immediateCallback] (timers.js:367:17)\r\n```\r\n\r\nCan't call the `sails.config.*` in the services ?\r\n\r\nThx"},"comment":{"url":"https://api.github.com/repos/balderdashy/sails/issues/comments/141099892","html_url":"https://github.com/balderdashy/sails/issues/3239#issuecomment-141099892","issue_url":"https://api.github.com/repos/balderdashy/sails/issues/3239","id":141099892,"user":{"login":"richdunajewski","id":5723249,"avatar_url":"https://avatars.githubusercontent.com/u/5723249?v=3","gravatar_id":"","url":"https://api.github.com/users/richdunajewski","html_url":"https://github.com/richdunajewski","followers_url":"https://api.github.com/users/richdunajewski/followers","following_url":"https://api.github.com/users/richdunajewski/following{/other_user}","gists_url":"https://api.github.com/users/richdunajewski/gists{/gist_id}","starred_url":"https://api.github.com/users/richdunajewski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richdunajewski/subscriptions","organizations_url":"https://api.github.com/users/richdunajewski/orgs","repos_url":"https://api.github.com/users/richdunajewski/repos","events_url":"https://api.github.com/users/richdunajewski/events{/privacy}","received_events_url":"https://api.github.com/users/richdunajewski/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T14:12:50Z","updated_at":"2015-09-17T14:12:50Z","body":"Does it work if you type `sails lift --prod` rather than www?"}}