Skip to content

Instantly share code, notes, and snippets.

@Rishbah-76
Created June 25, 2021 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rishbah-76/d360735a3f9d69534e5a5e501558bb8d to your computer and use it in GitHub Desktop.
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
#!/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