This project is not supported or updated anymore. If you're looking for a way to execute multiple queries in parallel, you should consider using HTTP Pipelining or (preferably) SPDY instead.
HTTP Requests Aggregator bundles multiple HTTP requests into one. You may use it to reduce the number of HTTP requests that browser has to perform in order to get all the data it needs.
-
Send POST request to URL
/hra/json
with JSON body like this:{ google: { url: 'http://www.google.com/' }, facebook: { url: 'http://www.facebook.com/' } }
-
Receive response like this:
{ google: { statusCode: 301, headers: {...}, body: '<HTML>...</HTML>\r\n' // yup, Google doesn't give a damn about markup validity }, facebook: { statusCode: 302, headers: {...}, body: '' // and Facebook doesn't even bother to explain anything } }
-
Install latest node.js
-
Clone the git repository
-
Create
config.local.js
and redefine any settings you wish fromconfig.js
like so:config = module.parent.exports; config.http.port = 8000;
-
Configure your frontend server to proxy requests to HRA. Here's example for nginx:
location /hra/ { proxy_pass http://127.0.0.1:8000/; }
-
Start HRA:
bin/hra-server
-
Force your fontend server to reload config, e.g.
/etc/init.d/nginx reload
Optional steps for devs:
- Install npm
npm install nodeunit
npm install request
- Create
test/config.local.js
and redefine any settings you wish fromtest/config.js
. - Run tests:
nodeunit test/test.js