Programming/node.js2019. 4. 23. 18:07

흐음.. 왜 안써지냐..

기본 예제로는 response.end(data) 식이었고..

얘는 response.write(data, endcoding); response.end(callback); 두개 문장으로 실행되는 유사한 효과를 준다는데

그럼 되는거 아닌가? ㅠㅠ

 

response.end([data][, encoding][, callback])#

History

This method signals to the server that all of the response headers and body have been sent; that server should consider this message complete. The method, response.end(), MUST be called on each response.

If data is specified, it is similar in effect to calling response.write(data, encoding) followed by response.end(callback).

If callback is specified, it will be called when the response stream is finished.

[링크 : https://nodejs.org/api/http.html#http_class_http_serverresponse]

 

 

+

으으 망할.. async 문제인가?

[링크 : https://teamtreehouse.com/community/error-write-after-end-3]

'Programming > node.js' 카테고리의 다른 글

node.js express 301 redirect  (0) 2019.05.15
node.js 항목 확인  (0) 2019.04.23
node.js 시그널 핸들링과 reload  (0) 2019.04.23
nodejs url param delete  (0) 2019.04.17
url 끝의 /  (0) 2019.04.17
Posted by 구차니