반응형
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 31 |
Tags
- 비트연산
- route
- axios
- node.js
- MySQL
- Navigation
- Callback
- css
- JSX
- nodeJS
- c++
- treenode
- queue
- routes
- array
- state
- Props
- leetcode
- React
- count
- priority_queue
- BinaryTree
- UE5
- map
- Context
- server
- bit
- component
- DP
- event
Archives
- Today
- Total
목록module (1)
우사미 코딩
[Node.js] Request 처리하기
1. node.js const http = require('http'); const routes = require('./routes.js'); const server = http.createServer(routes.handler); // console.log(`text : ${routes.someText}`); server.listen(3000, () => { console.log("Server is listening on port 3000"); }); 이 페이지에서는 서버를 실행하고 routes.js라는 모듈을 import해서 requestHandler로 사용한다. createServer에는 인자가 req,res가 들어가는데 req : client에서 들어온 요청 res : client로 보낼 응답 이..
Node.js
2023. 9. 20. 04:33