Skip to content

Instantly share code, notes, and snippets.

@henriquemenezes
Created March 16, 2016 20:48
Show Gist options
  • Save henriquemenezes/cb8528078d1229ed7837 to your computer and use it in GitHub Desktop.
Save henriquemenezes/cb8528078d1229ed7837 to your computer and use it in GitHub Desktop.
List of one-line web servers

One-line Web Servers

Python 2.x

python -m SimpleHTTPServer 8080

Python 3.x

python -m http.server 8080

Ruby 1.9.2+

ruby -run -e httpd . -p 8080

PHP 5.4+

php -S 0.0.0.0:8080

NodeJS (http-server)

$ npm install -g http-server
$ http-server -p 8000

NodeJS (node-static)

$ npm install -g node-static
$ static -p 8000

Go (spark)

$ go get github.com/rif/spark
$ spark -port 8000 .

BusyBox

$ busybox httpd -f -p 8000

Webfsd

$ webfsd -F -p 8000

Credits

@patrickhener
Copy link

Alternative for go is goshs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment