Nodejs } Problem in connecting with localhost : Error 404
I am trying to start a file server under node.js using the following command on my terminal :
$ npx serve -p 5050 static
Above command works and generate a display box on terminal.
Example like the following :
But it doesn't work and generate 404 error after I copy and paste "http://localhost:5050" on safari address bar.
Following method tried :
- turn off of firewall -> Doesn't work
- change code to "$ npx serve -p 3000 static" on terminal --> Doesn't work
Is there anyone whom knows what goes wrong?
MacBook Pro 14″, macOS 14.4