added unpack & moved build stuff
This commit is contained in:
32
tools/console.js
Normal file
32
tools/console.js
Normal file
@@ -0,0 +1,32 @@
|
||||
const http = require('http');
|
||||
|
||||
function time() {
|
||||
let now = new Date();
|
||||
|
||||
return `${now.getHours().toString().padStart(2, "0")}:${now.getMinutes().toString().padStart(2, 0)}:${now.getSeconds().toString().padStart(2, 0)}`;
|
||||
}
|
||||
|
||||
const server = http.createServer((req, res) => {
|
||||
|
||||
if (req.method != "POST") {
|
||||
res.writeHead(400);
|
||||
return;
|
||||
}
|
||||
|
||||
var id = req.url.substring(1);
|
||||
|
||||
let data = "";
|
||||
|
||||
req.on('data', chunk => {
|
||||
data += chunk;
|
||||
})
|
||||
|
||||
req.on('end', () => {
|
||||
console.log(`[${time()}][${id}]${data}`);
|
||||
res.writeHead(200);
|
||||
res.end();
|
||||
})
|
||||
});
|
||||
|
||||
console.log("Listening on port 8080")
|
||||
server.listen(8080);
|
||||
8
tools/minify.js
Normal file
8
tools/minify.js
Normal file
@@ -0,0 +1,8 @@
|
||||
const fs = require("fs");
|
||||
const luamin = require("luamin");
|
||||
|
||||
const haxeOutput = fs.readFileSync(0, { encoding: "utf8" });
|
||||
|
||||
const minified = luamin.minify(haxeOutput);
|
||||
|
||||
fs.writeFileSync(1, minified);
|
||||
5
tools/zlibDeflate.js
Normal file
5
tools/zlibDeflate.js
Normal file
@@ -0,0 +1,5 @@
|
||||
const zlib = require('node:zlib');
|
||||
|
||||
let def = zlib.createDeflate();
|
||||
|
||||
process.stdin.pipe(def).pipe(process.stdout);
|
||||
Reference in New Issue
Block a user