Web Server One Liners

Some very handy one line commands for starting a web server for testing and development.

Run the command in the directory you wish to serve, or where provided, supply a flag for the directory.

Most of these should also work on Android via Termux (if the language can be installed).

php -S localhost:8000
python -m http.server 8000

After starting the web server, you can access content at 127.0.0.1:8000.

About

I'm a technology professional who's been passionate about computers since my Grandad introduced me to an Intel 386 back in the 90s when I was a kid. Those moments inspired a passion within for technology, and I've been playing around with anything with a circuit board ever since. Whenever I have a moment you can probably find me working on something computer-related, and this is where I like to write about those moments.