Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 如何知道http服务器正在使用哪个端口?_Angular_Npm - Fatal编程技术网

Angular 如何知道http服务器正在使用哪个端口?

Angular 如何知道http服务器正在使用哪个端口?,angular,npm,Angular,Npm,在这里,我通过命令提示符使用npm install HTTP server-g安装HTTP服务器 但是在安装之后,它给出了一些相关的路径,而不是端口号,那么我怎么知道端口号是什么呢 http://localhost:8080/index.html 它在IIS 8.5上引发了一个错误。您需要像这样运行命令 http服务器,位于index.html所在的目录中 您可以显式地给出用于http服务器-p 8918的端口的命令,这将使用端口8918,如果我正确调用8080,则无参数的命令默认为8080

在这里,我通过命令提示符使用npm install HTTP server-g安装HTTP服务器 但是在安装之后,它给出了一些相关的路径,而不是端口号,那么我怎么知道端口号是什么呢

http://localhost:8080/index.html 

它在IIS 8.5上引发了一个错误。

您需要像这样运行命令
http服务器
,位于index.html所在的目录中 您可以显式地给出用于http服务器-p 8918的端口的命令,这将使用端口8918,如果我正确调用8080,则无参数的命令默认为8080或8081

你可以在上找到更多信息