Created
          October 18, 2012 15:10 
        
      - 
      
 - 
        
Save falsecz/3912460 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | facebookUser = app.require 'facebook/user' | |
| app.use methodBodyParser | |
| app.use streamBodyParser | |
| app.method 'xxxx', (req, res) -> | |
| # probehlo body parserem | |
| app.callFacebookUser .... | |
| facebookUser {id: 234324}, (err, data) -> | |
| stream = facebookUser (res) -> | |
| res.on 'data' | |
| res.on 'error' | |
| stream. | |
| res.data | |
| app.stream 'str', (req, res) -> | |
| req.on 'error', -> | |
| req.on 'line', (string) -> | |
| req.on 'object', (object) -> | |
| # prisel mi object | |
| res.object {} | |
| .... | |
| res.end() | |
| throw | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment