Building Rich a Dev Server
Draft Post I’ve really been digging @willmcgugan ’s rich library for creating TUI like interfaces in python. I’ve only recently started to take full advantage of it. Dev Server # I am working on a project in which I want to have a dev server running continuously in the background. I really like dev servers theat automatically chooose an unused port and list out the running pid so that I can kill it if I need to. automatic port number auto-restart display ( port, pid, uptime) finding the port # I am very novice at best when it comes to sockets, the following function came from searching StackOverflow for how to tell if a port is in use. I recursively check if a port is being used, if it is I increment by one until I find an unused port to return. The Dev Server # I am going super basic here and just running. It works for what I need it for, it hosts my files for the browser to display, and if I try a route without an index. html it gives me a decent file list. Optionally if you wanted a…