Difference between revisions of "Running Sites Locally"

From CSE256A Wiki
Jump to navigation Jump to search
(Created page with "When working on your assignments, you will likely want to be able to test your submissions locally as you work. Python provides an easy way to do that. # Open a terminal wind...")
 
m
Line 1: Line 1:
−
When working on your assignments, you will likely want to be able to test your submissions locally as you work. Python provides an easy way to do that.
+
Python provides an easy way to to test your submissions locally as you work on your assignments.
  
 
# Open a terminal window or the terminal in your code editor.
 
# Open a terminal window or the terminal in your code editor.
 
# Navigate to your repository folder. This should be something like: cse256a-s20-<YOURWUSTLKEY>.
 
# Navigate to your repository folder. This should be something like: cse256a-s20-<YOURWUSTLKEY>.
−
# Type in:
+
# Next, start a local webserver from that directory by running:
 
<pre>python -m http.server 8000.</pre>
 
<pre>python -m http.server 8000.</pre>
−
This starts a local webserver from that directory.
+
# Navigate to your project in your browser of chioce. For the first project this would be: http://localhost:8000/information-foraging/files/index.html
−
# Navigate to your project. For the first project this would be: ​ http://localhost:8000/information-foraging/files/index.html
 

Revision as of 16:37, 18 May 2020

Python provides an easy way to to test your submissions locally as you work on your assignments.

  1. Open a terminal window or the terminal in your code editor.
  2. Navigate to your repository folder. This should be something like: cse256a-s20-<YOURWUSTLKEY>.
  3. Next, start a local webserver from that directory by running:
python -m http.server 8000.
  1. Navigate to your project in your browser of chioce. For the first project this would be: http://localhost:8000/information-foraging/files/index.html