Name: js-handler/node_modules/nodeunit/node_modules/tap/bin/tap-http.js 
1:
#!/usr/bin/env node
2:
 
3:
// just an example, really
4:
// Run with `node tap-http.js path/to/tests/`
5:
 
6:
var argv = process.argv.slice(2)
7:
  , path = require("path")
8:
  , Runner = require("../lib/tap-runner")
9:
 
10:
  , http = require("http")
11:
  , server = http.createServer(function (req, res) {
12:
    // it'd be nice to return a non-200 if the tests fail, but we don't
13:
    // know the status until it's done, so that would mean not being able
14:
    // to pipe the output
15:
    res.writeHead(200, {'content-type': 'text/plain'})
16:
    new Runner(argv, null).pipe(res)
17:
  })
18:
 
19:
server.listen(1337)