#!/usr/bin/env node

const
express = require('express'),
path = require('path'),
postprocess = require('postprocess');

const IP_ADDRESS = process.env['IP_ADDRESS'] || '127.0.0.1';

var client = express.createServer(),
    server = express.createServer();

var subMiddleware = postprocess(function(req, buf) {
  var re = new Regexp('127\.0\.0\.1', 'g');
  return buf.replace(re, IP_ADDRESS);
});

client
  .use(express.static(path.join(__dirname)))
  .use(subMiddleware)
  .listen(8100);

server
  .use(express.static(path.join(__dirname)))
  .use(subMiddleware)
  .listen(8200);

console.log("open http://" + IP_ADDRESS + ":8100/example/parent.html");

@@ -325,17 +325,17 @@
  Reg
-e
+E
 xp('127%5C
 .0%5C.
@@ -334,14 +334,17 @@
 127%5C
+%5C
 .0%5C
+%5C
 .0%5C
+%5C
 .1',
@@ -400,16 +400,80 @@
 %0Aclient%0A
+  .use(express.logger(%7B format: 'dev' %7D))%0A  .use(subMiddleware)%0A
   .use(e
@@ -509,38 +509,16 @@
 name)))%0A
-  .use(subMiddleware)%0A
   .liste
@@ -534,16 +534,80 @@
 %0Aserver%0A
+  .use(express.logger(%7B format: 'dev' %7D))%0A  .use(subMiddleware)%0A
   .use(e
@@ -643,38 +643,16 @@
 name)))%0A
-  .use(subMiddleware)%0A
   .liste

fix substitution middleware for example server. how did that ever work?