Created
May 29, 2009 05:15
-
-
Save anandology/119795 to your computer and use it in GitHub Desktop.
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
"""web frontend for fastcgi process. | |
Usage: | |
python fcgi_server.py socket-file | |
""" | |
from web.wsgiserver import CherryPyWSGIServer | |
from flup.client.fcgi_app import FCGIApp | |
server_address = ("0.0.0.0", 8080) | |
def main(socket): | |
app = FCGIApp(connect=socket) | |
server = CherryPyWSGIServer(server_address, app) | |
print "http://%s:%d/" % server_address | |
try: | |
server.start() | |
except KeyboardInterrupt: | |
server.stop() | |
if __name__ == "__main__": | |
import sys | |
main(sys.argv[1]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment