code share: My Spontaneous HTTP-Server

(Yes, I know, VSCode includes the wonderful Live Server)

Here is my gaffer tape and spray foam solution that allows you to start your HTTP server couch potato style:

Ingredients:

  • shell,
  • zenity
  • netstat
  • docker (trinitronx/python-simplehttpserver)
  • pwgen

Directions:

  1. ask for directory
  2. check for currently used ports
  3. randomly select a nice free port
  4. generate a unique container name
  5. serve your directory via a HTTP-server
  6. show link to address with option to close server

View the source

原文链接:code share: My Spontaneous HTTP-Server

© 版权声明
THE END
喜欢就支持一下吧
点赞9 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容