views.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * View Engine Configuration
  3. * (sails.config.views)
  4. *
  5. * Server-sent views are a secure and effective way to get your app up
  6. * and running. Views are normally served from actions. Below, you can
  7. * configure your templating language/framework of choice and configure
  8. * Sails' layout support.
  9. *
  10. * For details on available options for configuring server-side views, check out:
  11. * https://sailsjs.com/config/views
  12. *
  13. * For more background information on views and partials in Sails, check out:
  14. * https://sailsjs.com/docs/concepts/views
  15. */
  16. module.exports.views = {
  17. /***************************************************************************
  18. * *
  19. * Extension to use for your views. When calling `res.view()` in an action, *
  20. * you can leave this extension off. For example, calling *
  21. * `res.view('homepage')` will (using default settings) look for a *
  22. * `views/homepage.ejs` file. *
  23. * *
  24. ***************************************************************************/
  25. // extension: 'ejs',
  26. /***************************************************************************
  27. * *
  28. * The path (relative to the views directory, and without extension) to *
  29. * the default layout file to use, or `false` to disable layouts entirely. *
  30. * *
  31. * Note that layouts only work with the built-in EJS view engine! *
  32. * *
  33. ***************************************************************************/
  34. layout: 'layouts/layout'
  35. };