0

I was trying to host a server and listening to port 80 using NodeJS

I was trying to run this code And This was the output I am getting I also checked this whether the port was already listening to something, can this be the reason? If yes then how can I fix it

1 Answers1

0

it is not required to specify a host.
Anyway it seems to be a firewall problem.
nodejs needs do use the ports in order to serve the web page.

Moreover i dont think yout file would be presented.
use `res.sendFile()` or get comfortable to express.js, which is a great
framework for node.js in order to simplify your server-side code.

i hope i was able to help you

CØDƐX
  • 1
  • 1