[nodejs] Re: using node-http-proxy question

2013-07-08 Thread Floby
node-http-proxy only proxies to other http servers. It does not serve content itself, unless you implement it. IIRC you can use http-proxy as a connect middleware. From there you could implement a drop-in replacement with a server with 2 middlewares. The first one serving static content. and the

Re: [nodejs] Re: using node-http-proxy question

2013-07-08 Thread TigerNassau
Thks, yeah i realized we need to run node-statc to serve basic pages. Somehow seems like a lot of node instances to run - one for proxy, one for restify, and another for static - but seems to work. Sent from my LG Mobile Floby wrote: >node-http-proxy only proxies to other http servers. It do

Re: [nodejs] Re: using node-http-proxy question

2013-07-08 Thread Mark Hahn
I highly recommend nginx. Easy to use and is faster at proxying than node. Node and Nginx work together beautifully. On Mon, Jul 8, 2013 at 7:53 AM, TigerNassau wrote: > Thks, yeah i realized we need to run node-statc to serve basic pages. > Somehow seems like a lot of node instances to run -

Re: [nodejs] Re: using node-http-proxy question

2013-07-08 Thread Pedro Teixeira
One observation: Nginx doesn't allow everything that Node does, limiting services exposed through it. For instance, Nginx can't handle streaming requests, requiring that the request ended before forwarding it to Node, which in our case made is opt for HAProxy. Not everyone has this case, but it

Re: [nodejs] Re: using node-http-proxy question

2013-07-09 Thread john.tiger
On 07/08/2013 03:05 PM, Pedro Teixeira wrote: One observation: Nginx doesn't allow everything that Node does, limiting services exposed through it. For instance, Nginx can't handle streaming requests, requiring that the request ended before forwarding it to Node, which in our case made is opt f