Programming/Javascript / / 2021. 11. 19. 17:18

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}`));

 

반응형