[스크랩/메모] node js .. Cannot set headers after they are sent to the client
플러터 클라이언트에서 api 로 두번 호출을 하니 뜨는 에러..
응답을 두번주려고할때 나는 에러같음next만 하거나, res send를 하면 next() 를 하면 안된다고함
참조https://velog.io/@yhe228/ERRHTTPHEADERSSENT-Cannot-set-headers-after-they-are-sent-to-the-client
[ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client 오류
NodeJS 개발자로서 다음과 같은 런타임 오류가 발생할 가능성이 있습니다.\[ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client오류 ERR_HTTP_HEADERS_SENT는 서버가
velog.io
https://www.inflearn.com/questions/6627
간단한 미들웨어를 만들어봤는데 에러가 발생합니다. - 인프런 | 질문 & 답변
처음에 root로 접속하면 hello를 응답하고 next()와 if문을 통해 50%의 확률로 다음 미들웨어로 이동하는 간단한 게임을 만들어봤습니다.const express = require('express');var app = express();app.use('/', (r...
www.inflearn.com
내경우는 app.use를 두번 호출해서
첫번째 요청된 미들웨어가 중복되서 호출되서 발생하는 오류였음..
app.use()는 api호출 모두에 응답하니 주의해서 호출..용도가 다름