const net = require("net");
console.log("Logs from your program will appear here!");
const server = net.createServer((socket) => {
socket.on("close", () => {
socket.write("HTTP/1.1 200 OK\r\n\r\n");
socket.end();
});
});
server.listen(4221, "localhost");
should be socket.on(“data”…)
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.