본문 바로가기

Programming/Javascript

Hello World!

728x90
const http = require("http");
const port = 3000;

http.createServer((request, response) => {
    response.writeHead(200, { "Content-Type": "text/html" });
    response.end("<h1>Hello World!</h1>");
}).listen(port, () => console.log(`Server running at http://localhost:${port}`));

 

반응형