无法使用node.js连接到Web服务器

我试图按照Angular教程,我不能通过步骤00第2部分。我使用node.js并尝试运行命令脚本/ web-server.js。 它只是显示我“…”,当我去本地主机端口8000说它无法连接。

有任何想法吗?

你只需要:

 git clone git://github.com/angular/angular-phonecat.git cd angular-phonecat node ./scripts/web-server.js 

所以你打算进入浏览器的URL实际上是http://localhost:8000/angular-phonecat/app/index.html

这取决于你所在的目录,如果你只是放在: http://localhost:8000你将能够导航到目录并以graphics方式打开index.html。

转到http://docs.angularjs.org/tutorial并按照步骤操作&#x3002; 具体做到以下几点 – 在命令提示符导航到您的解决scheme目录 – 即用户\“<>”\ angular-phonecat并运行

npm安装

该命令将下列工具下载到node_modules指令中:

Bower – 客户端代码包pipe理器

http-server – 简单的本地静态web服务器

Karma – unit testing跑步者

量angular器 – 末端2testing跑步者

然后运行以下命令 –

npm开始

现在你应该可以在你的浏览器上导航到localhost:8000 / app / index.html