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 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>""") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setup
index.py
should be marked as executablechmod +x index.py
index.py
should be in a folder calledcgi-bin
eg.
Run CGI server
python -m http.server --cgi