Try to search your question here, if you can't find : Ask Any Question Now ?

When listening to server, it says server is not defined. Is there another way to listen to a server?

HomeCategory: stackoverflowWhen listening to server, it says server is not defined. Is there another way to listen to a server?
craig asked 2 weeks ago

I’m setting up a new server in Node.js, and the terminal keeps on saying Reference Error: server is not defined. Is there another way to setup a server? Or is there a syntax error?

const http = require('http');

http.createServer((req, res) => {
    console.log(req)
});

server.listen(3000);
1 Answers
Best Answer
naveen answered 2 weeks ago
Your Answer

16 + 19 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com