One line webservers for everybody

Read in 1 minute ·

Sometimes it is necessary to serve a folder with static resources (images, for example) as a web server. The probably most popular commands to perform these tasks are:

php -S localhost:9999
python -m SimpleHTTPServer 9999

The option that uses PHP built-in web server requires PHP 5.4+. The following gist provides several other ways to run a webserver locally.

Avatar photo If you like my content, follow me on Twitter and GitHub

Comments

comments powered by Disqus