Skip to content

Instantly share code, notes, and snippets.

@nepsilon
Last active May 7, 2017 09:03
Show Gist options
  • Save nepsilon/7b6e5ecd051a9318e161 to your computer and use it in GitHub Desktop.
Save nepsilon/7b6e5ecd051a9318e161 to your computer and use it in GitHub Desktop.
How to quickly serve files or directories over the network — First published in fullweb.io issue #4

Quick web server to serve files on your LAN

Need to quickly serve files over the network? Or even a full directory? Here is how to do with Python, PHP and NodeJs:

With Python 2.x:

$ python -m SimpleHTTPServer

With Python 3.x:

$ python -m http.server

With PHP:

$ php -S localhost:8000

With NodeJs:

$ npm install -g http-server
$ http-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment