I got a basic question.
I'm trying out Sails (http://sailsjs.org/) and it has terminal commands to generate entity such as User
entity:
sails generate api user
My question is, the UserController.js file shows:
/**
* UserController
*
* @description :: Server-side logic for managing users
* @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers
*/
module.exports = {
};
How come when I access:
http://localhost:1337/user/create
It knows how to create a new User entity ? The controller clearly does not have a create action like this:
module.exports = {
create: function(req, res) {
// code to create new user
}
};
So surely nothing should happen.
I did a bit of Symphony 2.0 PHP web framework and we needed to create those actions manually.
I'm confuzzled and impressed at the same time, any ideas ?