Last active
          December 15, 2015 02:59 
        
      - 
      
- 
        Save euoia/5190711 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
    
  
  
    
  | var http = require('http'); | |
| var httpProxy = require('http-proxy'); | |
| var proxyOptions = { | |
| pathnameOnly: true, | |
| router: { | |
| '/app': 'localhost:3000', | |
| '/accounts': 'localhost:8001' | |
| } | |
| } | |
| httpProxy.createServer( | |
| proxyOptions, | |
| function (req, res, next) { | |
| console.log('incoming'); | |
| next(); | |
| } | |
| ).listen(3001); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Here's what I see with netcat when a request comes in from the web browser: