Skip to content

Instantly share code, notes, and snippets.

@yashprit
Last active August 29, 2015 14:02
Show Gist options
  • Save yashprit/1194830d72b04f0390a5 to your computer and use it in GitHub Desktop.
Save yashprit/1194830d72b04f0390a5 to your computer and use it in GitHub Desktop.
Simple Python server on mac

You can open html file in browser, but browser open it with file:///, serving everything from file system is not possible, I mean working with ThreeJS, ploymer you need to run everything on web server. So here is very simple web server using Python on Mac

  1. Go to directory (your development) where you need to serve file using web server
  2. Type python -m SimpleHTTPServer 8000
  3. open in browser http://localhost:8000/<name_of_file>.html

You can see file serving from web server, instead of file:///

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