Relative Content

Tag Archive for javascriptnode.js

How to change the port number if it is already taken?

I’m trying to build my current project it in a way so my friends can create servers on one network so we can connect to each other (LAN communication, pretty much). The only problem is when I run my program in two terminal windows, my second run fails and throws errors at me because ports are already taken, which is logical.

How to get requested page (node.js)

I am working with Node.js servers. When I log on to the server, the code,
res.write("What ever text you choose")
will run and I will only get the “What ever text you choose” no matter what path I type. I know you can “write” a file so every time you log on to the server, it will give you that page. The problem I am having is that the server will only give me the one file. How can I request a different file based on the URL?

Error reading file in node.js using terminal

When i want to read a file in node js it won’t display the file in the browser when I execute. and in the terminal says no such file or directory while I use the exact file path anyone can answer this why?

Error reading file in node.js using terminal

When i want to read a file in node js it won’t display the file in the browser when I execute. and in the terminal says no such file or directory while I use the exact file path anyone can answer this why?

Error reading file in node.js using terminal

When i want to read a file in node js it won’t display the file in the browser when I execute. and in the terminal says no such file or directory while I use the exact file path anyone can answer this why?

Error reading file in node.js using terminal

When i want to read a file in node js it won’t display the file in the browser when I execute. and in the terminal says no such file or directory while I use the exact file path anyone can answer this why?