code share: My Spontaneous HTTP-Server

twitter logo github logo ・1 min read

(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:


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


  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

twitter logo DISCUSS
Classic DEV Post from Dec 26 '18

What’s your favorite JS interview question?

Peter Hoffmann profile image
Father, Full Stack Developer, World Savior

Where the wild code grows

Sign up (for free)