harmon
A middleware component for node-http-proxy using trumpet to parse and transform the response from the proxied server.
install
$ npm install harmon
examples
Overview
In this example the HTML below is returned from the remote server and parsed:
Nodejitsu Http Proxy& Frames
The following line is removed:
& Frames
And is replaced with:
+ Trumpet
Run It!
from your project root:
$ cd node_modules/harmon/examples
$ node simple.js
Browse to localhost:8000 and you should see:
Code
var http =connect =httpProxy = ;var selects = ;var simpleselect = {};simpleselectquery = '.b';simpleselect {node;}selects;//// Basic Connect App//var app = ;var proxy = httpProxy//Additional true parameter can be used to ignore js and css files.//app.use(require('../')([], selects, true));app;app;http;http;
or See how images could be rotated.
$ cd node_modules/harmon/examples
$ node rotate.js
See trumpet for the types of queries and functions you can use.