annotate server.py @ 1:394ff157b665

Got Gnusto to load and 'run' a story file in web content.
author Atul Varma <varmaa@toolness.com>
date Sat, 10 May 2008 09:29:27 -0700
parents
children de12cd84cf0a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
394ff157b665 Got Gnusto to load and 'run' a story file in web content.
Atul Varma <varmaa@toolness.com>
parents:
diff changeset
1 import SimpleHTTPServer
394ff157b665 Got Gnusto to load and 'run' a story file in web content.
Atul Varma <varmaa@toolness.com>
parents:
diff changeset
2 import SocketServer
394ff157b665 Got Gnusto to load and 'run' a story file in web content.
Atul Varma <varmaa@toolness.com>
parents:
diff changeset
3
394ff157b665 Got Gnusto to load and 'run' a story file in web content.
Atul Varma <varmaa@toolness.com>
parents:
diff changeset
4 PORT = 8000
394ff157b665 Got Gnusto to load and 'run' a story file in web content.
Atul Varma <varmaa@toolness.com>
parents:
diff changeset
5
394ff157b665 Got Gnusto to load and 'run' a story file in web content.
Atul Varma <varmaa@toolness.com>
parents:
diff changeset
6 Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
394ff157b665 Got Gnusto to load and 'run' a story file in web content.
Atul Varma <varmaa@toolness.com>
parents:
diff changeset
7
394ff157b665 Got Gnusto to load and 'run' a story file in web content.
Atul Varma <varmaa@toolness.com>
parents:
diff changeset
8 httpd = SocketServer.TCPServer(("", PORT), Handler)
394ff157b665 Got Gnusto to load and 'run' a story file in web content.
Atul Varma <varmaa@toolness.com>
parents:
diff changeset
9
394ff157b665 Got Gnusto to load and 'run' a story file in web content.
Atul Varma <varmaa@toolness.com>
parents:
diff changeset
10 print "Serving files at http://localhost:%d" % PORT
394ff157b665 Got Gnusto to load and 'run' a story file in web content.
Atul Varma <varmaa@toolness.com>
parents:
diff changeset
11
394ff157b665 Got Gnusto to load and 'run' a story file in web content.
Atul Varma <varmaa@toolness.com>
parents:
diff changeset
12 httpd.serve_forever()