1

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!

1
  • 1
    can you show your code? Commented Feb 17, 2015 at 9:14

1 Answer 1

2

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...

Sign up to request clarification or add additional context in comments.

3 Comments

Awesome iis was causing the problem. But why didn't it work in the browser when I defined the port number?
not sure - were there any errors in the console when you ran it and hit it in the browser?
:) it's all working now. so strange... anyways running iisreset /stop solved the problem with port 8080. I then ran iisreset /start and port 1234 started working again... go figure. Thanks for the help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.