gpt4 book ai didi

html - 通过终端服务 npm http-server 时出错。 (错误 404)

转载 作者:太空狗 更新时间:2023-10-29 14:20:23 24 4
gpt4 key购买 nike

在发现我使用 ng-view 时遇到的问题是 chrome 出于安全原因不支持跨源请求后,我一直在尝试为我的 HTML 文件运行本地 http 服务器。因此,我下载了 npm http-server 并尝试运行我的 html 代码,但我收到错误消息:

Starting up http-server, serving indexTemplate.html
Available on:
http://127.0.0.1:8080
http://172.27.88.21:8080
Hit CTRL-C to stop the server
[Mon Jun 27 2016 19:48:11 GMT+0900 (KST)] "GET /" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36"
[Mon Jun 27 2016 19:48:11 GMT+0900 (KST)] "GET /" Error (404): "Not found"

谁能帮我弄清楚问题是什么以及我该如何解决?任何建议和帮助将不胜感激!

最佳答案

尝试在没有 indexTemplate.html 作为参数的情况下只运行 http-server,在你只有 indexTemplate.html 的文件夹中,并且它应该工作得很好。

关于html - 通过终端服务 npm http-server 时出错。 (错误 404),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38053194/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com