sails.js Blueprint API


How does Blueprint API works?

When sails initially starts using sails lift, sails looks to see if you have any controller defined. In our example, we have one controller, the User controller. Sails then provides access to blueprint actions for this user controller as if we built them in the controller ourselves. Sails also automatically creates blueprint routes at the time of lifting the server. So even if no routes is defined in /config/routes.js and no action is defined in /api/controllers/UserController.js explicitly, after lifting the server all these routes and actions are available to use.