const http = require('http');
const hostname = '127.0.0.1';
const port = 3000;
const server = http.createServer((req, response) => {
  console.log('มีคน request มานะ');
  response.statusCode = 200;
  response.setHeader('Content-Type', 'text/html');
  response.end(`<h1>Hello World<h1>`);
});
server.listen(port, hostname, () => {
  console.log(`เปิดเว็บไว้ที่ http://${hostname}:${port}/`);
});