You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var http = require('http');
function fn(eq, res){
res.writeHead(200, {'Content-Type': 'text/html'});
res.write(req.url);
res.end();
}
var server=http.createServer(fn);
server.listen(8000);
It gives the error:
events.js:163
throw er; // Unhandled 'error' event
^
Error: listen EFAULT :::8000
at Object.exports._errnoException (util.js:1034:11)
at exports._exceptionWithHostPort (util.js:1057:20)
at Server._listen2 (net.js:1265:14)
at listen (net.js:1301:10)
at Server.listen (net.js:1392:7)
at Object.<anonymous> (/storage/sdcard0/shell/bin/nodejsServer.js:8:8)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
Adding the second parameter to liste, also produces an error:
> Error: listen EFAULT 127.0.0.1:8000
at Object.exports._errnoException (util.js:1034:11)
at exports._exceptionWithHostPort (util.js:1057:20)
at Server._listen2 (net.js:1265:14)
at listen (net.js:1301:10)
at doListening (net.js:1416:7)
at _combinedTickCallback (internal/process/next_tick.js:83:11)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
>
I tried a simple http server example:
It gives the error:
Adding the second parameter to liste, also produces an error:
Here is a screenrecord of the activity:
https://drive.google.com/file/d/1bu9rHT0-Jxg5SQl8e1zjfHDzObMYQQxP/view?usp=sharing
The text was updated successfully, but these errors were encountered: