http 파트 복습 (1) 썸네일형 리스트형 HTTP 모듈로 '간단한' 웹서버 구축하기 웹서버 : 클라이언트가 요청한 정보를 서버의 로직으로 처리하여 여러가지 형태로 응답해주는 도구 const http = require("http"), httpStatus = require("http-status-codes"), port =3000; const app =http.createServer((req,res)=> { //서버 인스턴스 생성(HTTP통신을 위한 도구) res.writeHead(httpStatus.OK, { //응답 컨텐츠의 기본 속성 설정 "Content-Type":"text/html" }); console.log(`method: ${req.method}`); console.log(`url: ${req.url}`); res.write(' write response! '); //응답중 .. 이전 1 다음