相关疑难解决方法(0)

节点http-server用index.html响应任何请求

我已在http-server全球安装.

我在localhost端口8080上从myDir启动它.在myDir中我有index.html.

如果我(从浏览器)请求http://localhost:8080/我得到index.html,这是好的.

如果我请求虽然http://localhost:8080/anything我没有从服务器得到任何响应.

相反,我想要的是我的服务器总是使用index.html响应任何到达端口8080上的localhost的http请求.

这可能吗.

提前致谢

httpserver node.js

11
推荐指数
4
解决办法
1万
查看次数

标签 统计

httpserver ×1

node.js ×1