This folder contains the vast majority of your app's back-end logic. It is home to the 'M' and 'C' in MVC Framework.
In it you will find the following:
- Controllers: Actions and controllers contain back-end logic that handles incoming requests (like form submissions).
- Helpers: Helpers are shared functions that can be called from anywhere in your app.
- Models: Models are the structures that contain data for your Sails App.
- Policies: Policies are middleware that restrict access to certain actions in your app.
You may also find these folders, which are not always generated by default in new Sails apps:
- Responses: Custom responses can help maintain consistent HTTP status codes and behavior across your app. (Since not every Sails application needs to define its own custom responses, this folder is sometimes excluded.)
- Services: Services are shared utilities common in Sails apps written before version 1.0. They can be just about anything, so for new apps, it's recommended that you use helpers instead.