Reputation: 93
I am following this tutorial: https://www.youtube.com/watch?v=I1USsIW8aWE at min 21:09 an http-server is called.
I have node installed on my windows box. I have also installed the http-server using npm.
When I try to run the server I get this error.
F:\Projects\LargeAppSpa\LargeAppSpa.FrontEnd
λ http-server src
C:\Users\Josh\AppData\Roaming\npm\node_modules\http-server\bin\http-server:51
if (err) throw err;
^
Error: listen EACCES
at exports._errnoException (util.js:746:11)
at Server._listen2 (net.js:1112:19)
at listen (net.js:1155:10)
at net.js:1253:9
at dns.js:85:18
at process._tickCallback (node.js:355:11)
at Function.Module.runMain (module.js:503:11)
at startup (node.js:129:16)
at node.js:814:3
Thinking this was a port problem I run this and it looks like it works...
F:\Projects\LargeAppSpa\LargeAppSpa.FrontEnd
λ http-server src -p1234
Starting up http-server, serving src on: http://0.0.0.0:1234
Hit CTRL-C to stop the server
When I navigate my browser to this location I get a "page can not be displayed message".
Question 1) How can I use http-server without the port and use the default 8080?
Question 2) Why is this not working? What did I do wrong?
Thanks!
Upvotes: 1
Views: 2160
Reputation: 38529
Usally, in Windows port 80 is probably tied up with IIS Server.
Try to stop iis first and after run your app again.
Error: listen EACCES
Is basically saying it can't have access to the port
Please post your app code too...
Upvotes: 2