Page not found after installation of node static

253 Views Asked by At

after the installation of node-static in my windows pc with the command:

npm install -g node-static

When I run the static.cmd, it says to me that it listen at http://127.0.0.1:8080 but when i try this address on my browser, it response always not found instead the index.html with the classic hello world. I don't understand what is the problem.

Thanks in andvace

1

There are 1 best solutions below

0
On

When you just type http://127.0.0.1:8080 node-static is trying to search for a nameless file so it returns "Not found" but if you will look at the command line while you are performing this request you'll see a 404 request to that empty file.

Just approach a real file in the directory you ran node-static from: http://127.0.0.1:8080/myFile.txt