Test the Website Locally
July 16, 2026 ยท View on GitHub
Opening index.html directly does not reproduce all web-server behavior. Run a local HTTP server instead.
Start a Local Server
From the project directory:
python3 -m http.server 8000 --bind 127.0.0.1
The bind address limits the development server to the local machine.
Open:
http://127.0.0.1:8000/
This development server is for local testing, not public production use.
Verify from the Terminal
In another terminal:
curl -I http://127.0.0.1:8000/
curl -I http://127.0.0.1:8000/about.html
Expect a successful status and an HTML content type for both pages.
Browser Checks
- The page fits on a narrow mobile viewport.
- Text remains readable in light and dark system themes.
- The About and Return links work.
- The browser console contains no missing-file errors.
- Refreshing a page returns the same content.
- No local absolute paths appear in HTML or CSS.
Stop the Server
Return to the terminal running the server and press Ctrl+C.
Confirm that nothing remains listening:
lsof -nP -iTCP:8000 -sTCP:LISTEN
No output means the test server has stopped.
Do Not Expose the Development Server Accidentally
Binding to 0.0.0.0 makes the server reachable on every network interface allowed by the firewall. Only do that when LAN testing is intentional and the files are safe to share.
Continue to Prepare a Linux Web Server.