Guest User

JS Listener

a guest
Feb 4th, 2020
87
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const http=require("http");
  2. http.createServer((req,res)=>{
  3.     res.end("Hello from the container\n");
  4.     /*var data="";
  5.     req.on("data",(chunk)=>data+=chunk);
  6.     req.on("end",()=>{
  7.         res.writeHead(200);
  8.         res.end("Got request!");
  9.     });*/
  10. }).listen(6113);
RAW Paste Data