OK 반환 서버- 모든 요청에 "OK"를 반환하는 서버는 다음과 같다. const http = require('http');const server = http.createServer((req, res) => { res.setHeader('Content-Type', 'text/html'); res.end('OK');});server.listen('3000', () => console.log('OK 서버 시작!')); res.setHeader('Content-Type', 'text/html');- 응답의 헤더 값을 설정한다.- 'text/html'은 텍스트를 html로 해석하겠다는 의미다. res.end('OK');- "OK"를 전달하고 응답을 종료한다. server.listen(port, cal..
"hello Node"를 출력하는 서버 - code const http = require('http'); let count = 0; const server = http.createServer((req, res) => { log(count); res.statusCode = 200; res.setHeader('Content-Type', 'text/plain'); res.write('hello\n'); setTimeout(() => { res.end("Node"); }, 2000); }); function log(count){ console.log((count += 1)); } server.listen(8000, () => console.log("Hello Node")); const http = require..
- Total
- Today
- Yesterday
- 스프링
- 미들웨어
- el
- Spring
- 네트워크
- 리액트
- Binding
- Session
- 서브넷팅
- 인가
- javaserverpage
- script element
- react
- Servlet
- Redux
- html css
- Java Server Page
- JSP
- nodejs
- CSS
- httpServletRequest
- CSS 속성
- Spring Security
- 내장객체
- Network
- 세션
- 스프링 시큐리티
- HTML
- 제이쿼리
- 서블릿
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |