08-27-周三_17-09-29

This commit is contained in:
2025-08-27 17:10:05 +08:00
commit 86df397d8f
12735 changed files with 1145479 additions and 0 deletions

19
node_modules/shoe/example/invert/server.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
var http = require('http');
var ecstatic = require('ecstatic')(__dirname + '/static');
var shoe = require('../../');
var server = http.createServer(ecstatic);
server.listen(9999);
var sock = shoe(function (stream) {
var iv = setInterval(function () {
stream.write(Math.floor(Math.random() * 2));
}, 250);
stream.on('end', function () {
clearInterval(iv);
});
stream.pipe(process.stdout, { end : false });
});
sock.install(server, '/invert');