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
smock-0.1.231 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.230 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.229 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.228 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.227 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.226 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.225 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.224 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.9 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.223 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.222 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.221 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.220 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.219 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.218 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.217 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.216 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.215 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.214 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js
smock-0.1.213 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/example/streaming/server.js