Concepts

This section of the documentation focuses on explaining some of the higher-level concepts you encounter when working with Sails at all stages: from development, to deployment, to scaling your app in production.

Table of Contents

  1. Actions and controllers
    1. Generating actions and controllers
    2. Routing to actions
  2. Assets
    1. Default tasks
    2. Disabling Grunt
    3. Task automation
  3. Blueprints
    1. Blueprint actions
    2. Blueprint routes
  4. Configuration
    1. The local.js file
    2. Using `.sailsrc` files
  5. Deployment
    1. FAQ
    2. Hosting
    3. Scaling
  6. E-commerce
  7. Extending Sails
    1. Adapters
      1. Available adapters
      2. Custom adapters
    2. Custom responses
      1. Adding a custom response
    3. Generators
      1. Available generators
      2. Custom generators
    4. Hooks
      1. Available hooks
      2. Events
      3. Hook specification
        1. .configure
        2. .defaults
        3. .initialize()
        4. .registerActions()
        5. .routes
      4. Installable hooks
      5. Project hooks
      6. Using hooks
  8. File uploads
    1. Uploading to GridFS
    2. Uploading to S3
  9. Globals
    1. Disabling globals
  10. Helpers
    1. Example helper
  11. Internationalization
    1. Locales
    2. Translating dynamic content
  12. Logging
    1. Custom log messages
  13. Middleware
    1. Conventional defaults
  14. Models and ORM
    1. Associations
      1. Many-to-many
      2. One way association
      3. One-to-many
      4. One-to-one
      5. Reflexive associations
      6. Through associations
    2. Attributes
    3. Errors
    4. Lifecycle callbacks
    5. Model settings
    6. Models
    7. Query language
    8. Records
    9. Standalone Waterline usage
    10. Validations
  15. Policies
    1. Access Control and Permissions
  16. Programmatic usage
    1. Tips and tricks
  17. Realtime
    1. Multi-server environments
    2. On the client
    3. On the server
  18. Routes
    1. Custom routes
    2. URL slugs
  19. Security
    1. Clickjacking
    2. Content security policy
    3. CORS
    4. CSRF
    5. DDOS
    6. P3P
    7. Socket hijacking
    8. Strict Transport Security
    9. XSS
  20. Services
  21. Sessions
  22. Shell scripts
  23. Testing
  24. Views
    1. Layouts
    2. Locals
    3. Partials
    4. View engines

Using Sails at work?

If your company has the budget, consider purchasing Flagship support. It's a great way to support the ongoing development of the open source tools you use every day. And it gives you an extra lifeline to the Sails core team.

Sails logo
  • Home
  • Get started
  • Support
  • Documentation
  • Documentation

For a better experience on sailsjs.com, update your browser.

Documentation

Reference Concepts App structure | Upgrading Contribution guide | Tutorials More

Concepts

  • Actions and controllers
    • Generating actions and controllers
    • Routing to actions
  • Assets
    • Default tasks
    • Disabling Grunt
    • Task automation
  • Blueprints
    • Blueprint actions
    • Blueprint routes
  • Configuration
    • The local.js file
    • Using `.sailsrc` files
  • Deployment
    • FAQ
    • Hosting
    • Scaling
  • E-commerce
  • Extending Sails
    • Adapters
      • Available adapters
      • Custom adapters
    • Custom responses
      • Adding a custom response
    • Generators
      • Available generators
      • Custom generators
    • Hooks
      • Available hooks
      • Events
      • Hook specification
        • .configure
        • .defaults
        • .initialize()
        • .registerActions()
        • .routes
      • Installable hooks
      • Project hooks
      • Using hooks
  • File uploads
    • Uploading to GridFS
    • Uploading to S3
  • Globals
    • Disabling globals
  • Helpers
    • Example helper
  • Internationalization
    • Locales
    • Translating dynamic content
  • Logging
    • Custom log messages
  • Middleware
    • Conventional defaults
  • Models and ORM
    • Associations
      • Many-to-many
      • One way association
      • One-to-many
      • One-to-one
      • Reflexive associations
      • Through associations
    • Attributes
    • Errors
    • Lifecycle callbacks
    • Model settings
    • Models
    • Query language
    • Records
    • Standalone Waterline usage
    • Validations
  • Policies
    • Access Control and Permissions
  • Programmatic usage
    • Tips and tricks
  • Realtime
    • Multi-server environments
    • On the client
    • On the server
  • Routes
    • Custom routes
    • URL slugs
  • Security
    • Clickjacking
    • Content security policy
    • CORS
    • CSRF
    • DDOS
    • P3P
    • Socket hijacking
    • Strict Transport Security
    • XSS
  • Services
  • Sessions
  • Shell scripts
  • Testing
  • Views
    • Layouts
    • Locals
    • Partials
    • View engines

Built with Love

The Sails framework is built by a web & mobile shop in Austin, TX, with the help of our contributors. We created Sails in 2012 to assist us on Node.js projects. Naturally we open-sourced it. We hope it makes your life a little bit easier!

Sails:
  • What is Sails?
  • Community
  • News
  • For business
About:
  • Our company
  • Security
  • Legal
  • Logos/artwork
Help:
  • Get started
  • Documentation
  • Docs
  • Contribute
  • Take a class

© 2012-2021 The Sails Company. 
The Sails framework is free and open-source under the MIT License. 
Illustrations by Edamame.