"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
const _nodechild_process = require("node:child_process");
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
const startPort = 1234;
const instanceCount = 10;
console.log(`Starting ${instanceCount} fake OctoPrint servers...`);
for(let i = 0; i < instanceCount; i++){
    const port = startPort + i;
    const process = (0, _nodechild_process.spawn)("node", [
        _nodepath.default.join(__dirname, "./mock-octoprint.server.js"),
        port.toString()
    ]);
    process.stdout.on("data", (data)=>{
        console.log(`[Server ${i + 1} - Port ${port}]: ${data.toString().trim()}`);
    });
    process.stderr.on("data", (data)=>{
        console.error(`[Server ${i + 1} - Port ${port}] ERROR: ${data.toString().trim()}`);
    });
    console.log(`Started server ${i + 1} on port ${port}`);
}
console.log("All servers started. Press Ctrl+C to stop all servers.");

//# sourceMappingURL=launch-http-servers.js.map