N
N
Norum2021-11-09 02:06:40
Node.js
Norum, 2021-11-09 02:06:40

Why does it throw an error when creating the createServer method?

when creating a callback in the createServer method, an error occurs?
6189ad7f8fdd6929896404.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
veryoriginalnickname, 2021-11-09
@veryoriginalnickname

seems to be something strange written in the arguments. Maybe so? or like this
http.createServer((request, response)=>{})

const server = http.createServer()
server.on('request', (request, response) => {})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question