+++ date = "2022-07-06T22:57:01+00:00" lastmod = "2022-07-06T22:57:01+00:00" tags = [ "webdev", "gists" ] author = "tdro" +++ {{< disclose >}} Web servers can be spun up quickly on the command line but with gotchas. {{}} Take the _innocent_ {{< abbr `PHP` "Hypertext Preprocessor" >}} web server {{< abbr cli "command line interface" >}}. ```shell php -S 127.0.0.1:8080 ``` Best not to use `PHP`'s web server `cli` (even for PHP) because routes with a dot (.) are [assumed](https://bugs.php.net/bug.php?id=61286) to be [static files](https://github.com/php/php-src/pull/3215). Use a real web server or superior `cli` web servers with minor gotchas. ```shell python -m http.server --bind 127.0.0.1 8080 busybox httpd -f -p 127.0.0.1:8080 ruby -run -e httpd . -p 8080 ```