Mitol icon indicating copy to clipboard operation
Mitol copied to clipboard

server.on('request') does not work

Open brandonros opened this issue 7 years ago • 1 comments

var server = http.createServer();


  server.on('request', function(req, res) {
    ...
  });

Function never gets registered/called.

brandonros avatar Apr 16 '18 15:04 brandonros

Yes, you are right, you can try this:

const server = http.createServer((req, res) => { ... });

Helidium avatar Apr 16 '18 15:04 Helidium