Edge Side Includes (ESI) Language is a templating language supported by popular CDN's such as Akamai and Varnish. This NPM module will preprocess ESI tags within your node server environment.
You want to embed the fragment of HTML from "http://snipets.com/abc.html" within an HTML document.
blah blah, oh and here i embed in the page a snipet using an ESI server ...
<esi:include src="http://snipets.com/snipet.html"></esi:include>
snipet.html
<b>Snipet</b>
With Node ESI script, you can pre-process ESI tags.
npm install esi --save
Simply pass it into any service which uses http.createServer, e.g. below i'm using connect.
var app = require('connect')();
var esi = require('esi');
app.use( esi );
var srv = http.createServer(app).listen( 8080 );
Now the page is constructed and the response looks like this...
blah blah, oh and here i embed in the page a snipet using an ESI server ...
<b>Snipet</b>
View the ESI specs or from the install directory run.
mocha specs -R spec
debug - prints out the tag handling
esi.debug = true;
vars - set/modify environment variables
esi.vars.HTTP_HOST = 'www.google.com';