node http-server to respond with index.html to any request

后端 未结 6 1605
迷失自我
迷失自我 2020-12-09 10:31

I have installed http-server globally.

I launch it from myDir on localhost port 8080. In myDir I have index.html

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-09 11:14

    Use as specified in the documentation.

    http-server --port 8080 -P http://localhost:8080?
    

    Note the ? at the end of the proxy URL.

提交回复
热议问题