response2 [HTTP] Response message [생활코딩] HTTP Response message 개발자도구 > Network > 파일 > Response Header HTTP/1.1 200 OK : HTTP버전, Status code(응답결과 코드), OK(응답결과를 사람이 이해하기 쉽게 표시) Content-Type : 웹서버의 응답은 text이고 html이라는 언어이기에 웹브라우저는 html로 해석 Content-Length : 응답하는 콘텐트의 사이즈 Accept-Length : 사이즈 단위 Content-Encoding : 이 콘텐트가 압축된 방식 Last-Modified : 마지막으로 수정된 날짜 2020. 8. 12. [Nodejs-express] app.get() [생활코딩] 홈페이지 구현 Node.js로만 된 코드var app = http.createServer(function(request,response){ var _url = request.url; var queryData = url.parse(_url, true).query; var pathname = url.parse(_url, true).pathname; if(pathname === '/'){ if(queryData.id === undefined){ fs.readdir('./data', function(error, filelist){ var title = 'Welcome'; var description = 'Hello, Node.js'; var list = template.list(filelist); .. 2020. 8. 7. 이전 1 다음 반응형