globals.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /**
  2. * Global Variable Configuration
  3. * (sails.config.globals)
  4. *
  5. * Configure which global variables which will be exposed
  6. * automatically by Sails.
  7. *
  8. * For more information on any of these options, check out:
  9. * https://sailsjs.com/config/globals
  10. */
  11. module.exports.globals = {
  12. /****************************************************************************
  13. * *
  14. * Whether to expose the locally-installed `lodash` as a global variable *
  15. * (`_`), making it accessible throughout your app. *
  16. * (See the link above for help.) *
  17. * *
  18. ****************************************************************************/
  19. _: require('lodash'),
  20. /****************************************************************************
  21. * *
  22. * Whether to expose the locally-installed `async` as a global variable *
  23. * (`async`), making it accessible throughout your app. *
  24. * (See the link above for help.) *
  25. * *
  26. ****************************************************************************/
  27. async: require('async'),
  28. /****************************************************************************
  29. * *
  30. * Whether to expose each of your app's models as global variables. *
  31. * (See the link at the top of this file for more information.) *
  32. * *
  33. ****************************************************************************/
  34. models: true,
  35. /****************************************************************************
  36. * *
  37. * Whether to expose the Sails app instance as a global variable (`sails`), *
  38. * making it accessible throughout your app. *
  39. * *
  40. ****************************************************************************/
  41. sails: true,
  42. };