serve current directory from command line

后端 未结 8 1618
梦如初夏
梦如初夏 2020-12-04 05:15

could someone give me a hint, howto serve the current directory from command line with ruby? it would be great, if i can have some system wide configuration (e.g. mime-types

8条回答
  •  死守一世寂寞
    2020-12-04 05:32

    python3 -m http.server
    

    or if you don't want to use the default port 8000

    python3 -m http.server 3333
    

    or if you want to allow connections from localhost only

    python3 -m http.server --bind 127.0.0.1
    

    See the docs.

提交回复
热议问题