Testing locally

Chrome has a permissions policy for local file:// testing that disallows AJAX requests, and some APIs do not work on file:// URLs in all browsers, so if possible, we recommend trying to run a simple server on your machine. If the steps below do not work for you, then we recommend using Firefox or pairing with someone who can run a local server.

On Mac or Linux

Macs and most Linux distros come with Python preinstalled. The following steps should work without additional setup:

  1. Open Terminal
  2. Navigate to your project directory (wherever you will save the files) by using the cd command.
  3. Run this command: python -m SimpleHTTPServer
    • If you are running Python 3, run this command instead: python -m http.server 8000
  4. If successful, you should then be able to access your project folder by pointing your browser to http://localhost:8000.

On Windows

If you are running Windows, you will need to make sure you have Python installed. To check, open a command prompt and enter python. If you see a response including the version number, Python is ready to go. Note whether the version starts with 2 or 3, press ctrl+c to return to the regular command prompt, and follow steps 2-4 of the Mac instructions above.

If the python command produces an error message, follow the steps below to install Python:

  1. Go to the Python Downloads page, and click one of the yellow buttons to download Python 2 or 3. Most of your classmates and teachers will be using Python 2, but 3 will work as well. (More info on version selection here.)
  2. Double-click the downloaded file to install Python.
  3. When the installation is complete, open PowerShell (NOT command line), and run this command:
    [Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27\;C:\Python27\Scripts\", "User")
    (Note: This code assumes that you have installed Python 2.7. If you installed a different version, look in your C:\ drive and check the name of the "PythonXX" directory. Replace both instances of Python27 in the code above with the directory name on your computer.)
  4. Run the python command again. You should now see a response with the Python version number. Using PowerShell or command line, follow steps 2-4 of the Mac instructions above.

On a Chromebook

If you are using a Chromebook for web development, you can use this chrome app found here.