Sha256: 3846747ba40f76d07eb15b38ec415fe90f2fc58f7521a75702defaa35a078c56

Contents?: true

Size: 568 Bytes

Versions: 74

Compression:

Stored size: 568 Bytes

Contents

var http = require('http');
var ecstatic = require('ecstatic')(__dirname);
var server = http.createServer(function (req, res) {
    if (req.url === '/doom') {
        res.setHeader('content-type', 'multipart/octet-stream');
        
        res.write('d');
        var i = 0;
        var iv = setInterval(function () {
            res.write('o');
            if (i++ >= 10) {
                clearInterval(iv);
                res.end('m');
            }
        }, 500);
    }
    else ecstatic(req, res);
});

console.log('Listening on :8082');
server.listen(8082);

Version data entries

74 entries across 72 versions & 5 rubygems

Version Path
gulp_assets-1.0.0.pre.5 template/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
gulp_assets-1.0.0.pre.4 template/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
gulp_assets-1.0.0.pre.3 template/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.268 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.267 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.266 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.265 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.264 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.263 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.262 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.261 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.260 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.259 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.258 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.256 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.255 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.254 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.253 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.252 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.251 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js