{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/sails/issues/2560","labels_url":"https://api.github.com/repos/balderdashy/sails/issues/2560/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails/issues/2560/comments","events_url":"https://api.github.com/repos/balderdashy/sails/issues/2560/events","html_url":"https://github.com/balderdashy/sails/issues/2560","id":54335205,"number":2560,"title":"Cannot access sails config in grunt task","user":{"login":"vollnhals","id":143592,"avatar_url":"https://avatars.githubusercontent.com/u/143592?v=3","gravatar_id":"","url":"https://api.github.com/users/vollnhals","html_url":"https://github.com/vollnhals","followers_url":"https://api.github.com/users/vollnhals/followers","following_url":"https://api.github.com/users/vollnhals/following{/other_user}","gists_url":"https://api.github.com/users/vollnhals/gists{/gist_id}","starred_url":"https://api.github.com/users/vollnhals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vollnhals/subscriptions","organizations_url":"https://api.github.com/users/vollnhals/orgs","repos_url":"https://api.github.com/users/vollnhals/repos","events_url":"https://api.github.com/users/vollnhals/events{/privacy}","received_events_url":"https://api.github.com/users/vollnhals/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/balderdashy/sails/labels/error","name":"error","color":"FF3366"},{"url":"https://api.github.com/repos/balderdashy/sails/labels/needs%20documentation","name":"needs documentation","color":"bfdadc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-14T15:32:18Z","updated_at":"2015-09-22T15:40:24Z","closed_at":"2015-09-22T15:40:24Z","body":"I have written a custom grunt task that needs to access the sails config.\r\n\r\n```\r\nmodule.exports = function (grunt) {\r\n  grunt.registerTask('customtask', function () {\r\n    console.log(sails.config.session.secret);\r\n  });\r\n};\r\n```\r\n\r\nBut i cannot access the sails object. I get the following error:\r\n\r\n```\r\nWarning: sails is not defined Use --force to continue.\r\n\r\nAborted due to warnings.\r\n```\r\n\r\nHow can I access the sails config? \r\n(Also how can I access the services?)"},"comment":{"url":"https://api.github.com/repos/balderdashy/sails/issues/comments/142327562","html_url":"https://github.com/balderdashy/sails/issues/2560#issuecomment-142327562","issue_url":"https://api.github.com/repos/balderdashy/sails/issues/2560","id":142327562,"user":{"login":"sailsbot","id":14700466,"avatar_url":"https://avatars.githubusercontent.com/u/14700466?v=3","gravatar_id":"","url":"https://api.github.com/users/sailsbot","html_url":"https://github.com/sailsbot","followers_url":"https://api.github.com/users/sailsbot/followers","following_url":"https://api.github.com/users/sailsbot/following{/other_user}","gists_url":"https://api.github.com/users/sailsbot/gists{/gist_id}","starred_url":"https://api.github.com/users/sailsbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sailsbot/subscriptions","organizations_url":"https://api.github.com/users/sailsbot/orgs","repos_url":"https://api.github.com/users/sailsbot/repos","events_url":"https://api.github.com/users/sailsbot/events{/privacy}","received_events_url":"https://api.github.com/users/sailsbot/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T15:40:24Z","updated_at":"2015-09-22T15:40:24Z","body":"Thanks for posting, @vollnhals.  I'm a repo bot-- nice to meet you!\n\nIt has been 60 days since there have been any updates or new comments on this page.  If this issue has been resolved, feel free to disregard the rest of this message.  On the other hand, if you are still waiting on a patch, please:\n\n  + review our [contribution guide](https://github.com/balderdashy/sails/blob/master/CONTRIBUTING.md) to make sure this submission meets our criteria (only _verified bugs_ with documented features, please;  no questions, commentary, or bug reports about undocumented features or unofficial plugins)\n  + create a new issue with the latest information, including updated version details with error messages, failing tests, and a link back to [the original issue]().  This allows GitHub to automatically create a back-reference for future visitors arriving from search engines.\n\nThanks so much for your help!"}}