我刚刚通过以下方式安装了http-server:
npm install --global http-server我想要设置一个服务器,为测试和学习目的向我展示我的目录列表。我已经试验过:
-d显示目录列表(默认为true)
-i Display autoIndex (默认为true)
但是,在创建服务器之后,它一直打开index.html而不是目录清单。
这或多或少是我想要得到的,而不是打开index.html:

我想达到的目标是:

发布于 2020-05-10 01:45:25
-iDisplay autoIndex (默认为true)
这使得http-server显示索引(默认情况下启用),您可以这样关闭它:
http-server -i false发布于 2020-05-09 09:14:45
https://stackoverflow.com/questions/61694277
复制相似问题