Skip to content
Browse files

0.0.1

  • Loading branch information...
1 parent 3c45faf commit 3d66bc47d40e04949d1ee981488a1e7c77c29d01 @morozovsk committed
Showing with 19 additions and 3 deletions.
  1. +19 −3 Readme.md
View
22 Readme.md
@@ -2,9 +2,9 @@ This is light weight mvc framework for express on node.js
samples of application structure:
-###without modules
+###without modules (https://github.com/morozovsk/mvc/tree/master/samples/sample-without-modules)
- -app/
+ app/
-controllers/
--index.js
-models/
@@ -14,7 +14,7 @@ samples of application structure:
--index/
---index.ejs
-###with modules
+###with modules (https://github.com/morozovsk/mvc/tree/master/samples/sample-with-modules)
app/
-controllers/
@@ -35,3 +35,19 @@ samples of application structure:
----layout.ejs
----index/
-----index.ejs
+
+You can use helpers in your controllers:
+
+ this._app - link to express.createServer()
+ this._request - link to express request
+ this._response - link to express response
+ this._params - link to request.params
+ this._param - link to request.param
+ this._query - link to request.query
+ this._cookies - link to request.cookies
+ this._partial - link to response.partial
+ this._redirect - link to response.redirect
+ this._local - link to response._local
+ this._locals - link to response._locals
+ this._queryParam(name, defaultValue) - method for request.query like request.param
+ this._url(params) - method for generate url from object (simle: this._url({controller:message, action:"edit", id: 5}) => '/message/edit?id=5')

0 comments on commit 3d66bc4

Please sign in to comment.
Something went wrong with that request. Please try again.