Sunday, July 10, 2016

Anatomy of a Sails app

API folder : This folder contains the vast majority of your app's back-end logic. It is home to the 'M' and 'C' in MVC Framework.

Controllers: Controllers contain most of the back-end logic for your app.
Models: Models are the structures that contain data for your Sails App.
Policies: Policies are typically used to authenticate clients and restrict access to certain parts of your app.
Responses: Server response logic (404 - Not Found, 500 - Server Error, etc)
Services: Services are similar to controller actions. They contain logic that used by your app that doesn't necessarily rely on .req() and .res().

references:

No comments:

Post a Comment