SailsJS, MVC JavaScript Framework
Get Start
Routes
LHS are the routes request and type of calling
RHS are the response, view will run file in view/
and action will run file in controller
, and string is redirect to another route
Actions and Controllers
There are two conventions
-
(req,res)=>res
(totally same as Express.JS)
-
object
Defining Modals
Modals are data structure of storage
Helper
it looks very similar to action
define a helper
call a helper