node to text file – .js output in node automatically creating a .txt file – is this possible
I am new to node and running a .js script using node command prompt window, see following
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.
“SyntaxError: Unexpected identifier ‘assert'” on JSON import in Node v22
A Node program of mine that worked fine in Node v21 now immediately crashes with a syntax error in Node v22. The line that triggers the error looks like this:
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?
Why is this nodejs / javascript array ending up null?
Given this code:
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?
How can I reduce multiple lines in just only one
I have a query that returns data in this structure: name | age | idMessage
.