0

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

sigLosco
  • 101
  • 3
  • 5
  • 10

1 Answers1

1

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

gibson
  • 1,066
  • 2
  • 10
  • 22