{"action":"closed","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?)"}}