Created
June 25, 2021 21:15
-
-
Save Rishbah-76/d360735a3f9d69534e5a5e501558bb8d to your computer and use it in GitHub Desktop.
Backend Server code to run the docker webapp via Python over network
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/python3 | |
import cgi | |
import subprocess | |
import time | |
print("content-type: text/html") | |
print() | |
k = cgi.FieldStorage() | |
cmd = k.getvalue("x") | |
o = subprocess.getoutput(cmd) | |
print(o) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment