Table of Contents

  1. Assets
    1. Default Tasks
    2. Disabling Grunt
    3. Task Automation
  2. Blueprints
    1. Blueprint Actions
    2. Blueprint Routes
  3. Configuration
    1. The local.js file
    2. Using `.sailsrc` Files
  4. Controllers
    1. Generating Controllers
    2. Routing to Controllers
  5. Custom Responses
    1. Adding a Custom Response
    2. Default Responses
  6. Deployment
    1. FAQ
    2. Hosting
    3. Scaling
  7. Extending Sails
    1. Adapters
      1. Available Adapters
      2. Custom Adapters
    2. Generators
      1. Available Generators
      2. Custom Generators
    3. Hooks
      1. Hook Specification
        1. .configure()
        2. .defaults
        3. .initialize()
        4. .routes
      2. Installable Hooks
      3. Project Hooks
      4. Using Hooks
  8. File Uploads
    1. Uploading to GridFS
    2. Uploading to S3
  9. Globals
    1. Disabling Globals
  10. Internationalization
    1. Locales
    2. Translating Dynamic Content
  11. Logging
    1. Custom log messages
  12. Middleware
    1. Conventional Defaults
  13. Models and ORM
    1. Associations
      1. Dominance
      2. Many-to-Many
      3. One Way Association
      4. One-to-Many
      5. One-to-One
      6. Through Associations
    2. Attributes
    3. Lifecycle callbacks
    4. Model Settings
    5. Models
    6. Query Language
    7. Validations
  14. Policies
    1. Sails + Passport
  15. Programmatic Usage
    1. Tips and Tricks
  16. Realtime
    1. Multi-server environments
    2. On the client
    3. On the server
  17. Routes
    1. Custom Routes
    2. URL Slugs
  18. Security
    1. Clickjacking
    2. Content Security Policy
    3. CORS
    4. CSRF
    5. DDOS
    6. P3P
    7. Socket Hijacking
    8. Strict Transport Security
    9. XSS
  19. Services
    1. Creating a Service
  20. Sessions
  21. Testing
  22. 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

  • Assets
    • Default Tasks
    • Disabling Grunt
    • Task Automation
  • Blueprints
    • Blueprint Actions
    • Blueprint Routes
  • Configuration
    • The local.js file
    • Using `.sailsrc` Files
  • Controllers
    • Generating Controllers
    • Routing to Controllers
  • Custom Responses
    • Adding a Custom Response
    • Default Responses
  • Deployment
    • FAQ
    • Hosting
    • Scaling
  • Extending Sails
    • Adapters
      • Available Adapters
      • Custom Adapters
    • Generators
      • Available Generators
      • Custom Generators
    • Hooks
      • Hook Specification
        • .configure()
        • .defaults
        • .initialize()
        • .routes
      • Installable Hooks
      • Project Hooks
      • Using Hooks
  • File Uploads
    • Uploading to GridFS
    • Uploading to S3
  • Globals
    • Disabling Globals
  • Internationalization
    • Locales
    • Translating Dynamic Content
  • Logging
    • Custom log messages
  • Middleware
    • Conventional Defaults
  • Models and ORM
    • Associations
      • Dominance
      • Many-to-Many
      • One Way Association
      • One-to-Many
      • One-to-One
      • Through Associations
    • Attributes
    • Lifecycle callbacks
    • Model Settings
    • Models
    • Query Language
    • Validations
  • Policies
    • Sails + Passport
  • 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
    • Creating a Service
  • Sessions
  • Testing
  • Views
    • Layouts
    • Locals
    • Partials
    • View Engines

Built with Love

The Sails framework is maintained by a web & mobile studio 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?
  • Treeline IDE
  • Contribute
  • Logos/artwork
About:
  • The Sails Company
  • Security
  • News
  • Legal
Help:
  • Get started
  • Documentation
  • Docs
  • Enterprise
  • Hire us

© 2012-2018 The Sails Company. 
The Sails framework is free and open-source under the MIT License.