net.javaforge.blog - Simple embedded web server on MacOSX

Install this theme
Simple embedded web server on MacOSX

Since Python is pre-installed on every MacOSX, starting a simple, embedded webserver on MacOSX that points to some local folder is pretty easy:

  • Open terminal ( /Applications/Utilities/Terminal.app )
  • Switch to the directory you want to make available via http:
    cd /path/to/some/folder
  • Start webserver by giving it a port number as command line parameter:
    python -m SimpleHTTPServer 8080

Now you can serve your folder via http. Open a web browser and point it to http://localhost:8080 (or http//<your.machine.ip.address>:8080)

Enjoy.

PRINT THIS POST WORDS: Notes: 2 View comments 3/24/13 — 5:41pm Short URL: https://tmblr.co/ZwTERug-xzaL Filed under: #macosx #python #http #web server
 
  1. webpi liked this
  2. tabraiz12 reblogged this from javaforge
  3. javaforge posted this
View the discussion thread
Blog comments powered by Disqus

AltStyle によって変換されたページ (->オリジナル) /