Node.js blog
The fifth version of the mvc Autodafe framework for node.js has been released The code has become more convenient to write, now you need to write less code, even less. Soon the code will not need to be written at all, it will be enough just to think about it.
An example of a controller action that makes two asynchronous queries to the database, compiles the index.html view and sends it to the client (while catching and processing all errors):
Detailed articles have been written about the intricacies of working with controllers , user authorization, and working with URLs .
And most importantly: the blog demo has been revised and documented in detail. A blog does not have rich functionality, but it can serve as a good starting point for developing your application.
An example of a controller action that makes two asynchronous queries to the database, compiles the index.html view and sends it to the client (while catching and processing all errors):
Site.prototype.index = function( response, request ){
response.send({
topic : this.models.topic.With( 'author', 'comments.author' ).find_by_pk( request.params.topic_id ),
news : this.models.news.find_all()
});
}
Detailed articles have been written about the intricacies of working with controllers , user authorization, and working with URLs .
And most importantly: the blog demo has been revised and documented in detail. A blog does not have rich functionality, but it can serve as a good starting point for developing your application.