Last active
November 4, 2022 19:49
-
-
Save nwjlyons/78b667119ef09f8b67f98db92a17e7ca to your computer and use it in GitHub Desktop.
CGI Python Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python | |
| print("""Content-Type: text/html | |
| <h1>Hello World</h1>""") |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setup
index.pyshould be marked as executablechmod +x index.pyindex.pyshould be in a folder calledcgi-bineg.
Run CGI server
python -m http.server --cgi