update readme

This commit is contained in:
加里 2014-09-01 17:23:01 +08:00
parent c5058dc23d
commit 3b7140d9fd
2 changed files with 5 additions and 5 deletions

View File

@ -10,12 +10,10 @@ Feature
Usage Usage
-------------- --------------
### step 0 - setup env
* install [NodeJS](http://nodejs.org/)
### step 1 - install ### step 1 - install
* install [NodeJS](http://nodejs.org/)
* ``npm install -g anyproxy`` , may require ``sudo`` * ``npm install -g anyproxy`` , may require ``sudo``
### step 2 - start server ### step 2 - start server
@ -43,7 +41,8 @@ module.exports = {
return false; return false;
}, },
//response to user via local logic, be called when shouldUseLocalResponse returns true //you may deal the response locally instead of sending it to server
//this function be called when shouldUseLocalResponse returns true
//callback(statusCode,resHeader,responseData) //callback(statusCode,resHeader,responseData)
//e.g. callback(200,{"content-type":"text/html"},"hello world") //e.g. callback(200,{"content-type":"text/html"},"hello world")
dealLocalResponse : function(req,callback){ dealLocalResponse : function(req,callback){

View File

@ -10,7 +10,8 @@ module.exports = {
return false; return false;
}, },
//response to user via local logic, be called when shouldUseLocalResponse returns true //you may deal the response locally instead of sending it to server
//this function be called when shouldUseLocalResponse returns true
//callback(statusCode,resHeader,responseData) //callback(statusCode,resHeader,responseData)
//e.g. callback(200,{"content-type":"text/html"},"hello world") //e.g. callback(200,{"content-type":"text/html"},"hello world")
dealLocalResponse : function(req,callback){ dealLocalResponse : function(req,callback){