5억으로은퇴하기
D+45 express 백엔드
후자17년
2023. 10. 14. 16:19
백엔드란?
front end의 요청(request)를 받아서
서버에서 백엔드 로직을 돌리고
결과를 응답(response)
클라이언트에서
request
↓
(서버가 on이면 포트에서 항상 listen 하고 있다)
서버 포트를 통해서
GET 방식으로 처리하고
respond send로 응답
↓
front end 전달
GET (주소창을 이용한 방식)
변수를 받는 두가지 방법
. params방식
. query 방식
app.get('/', (req.res) =>{
res.send('Hello World')
})
파라미터를 바로 변수값으로 넣어보자
app.get('/user/:name', (req.res) =>{
const { name } = req.params
})
후아레즈 jrhpuhpu 17:20
11-1
odos I did see someone's things here.
I moved them to a less desirable location.
10-2
always figured him for a loon.
9-3
I know when a man is gone.
8-4
I have trouble talking that fast.
7-5
But this was the real thing.
6