Mercurial > web-gnusto
annotate server.py @ 93:817aa2851339 default tip
Added a very simple index.html.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Fri, 23 May 2008 03:50:44 -0700 |
parents | de12cd84cf0a |
children |
rev | line source |
---|---|
78
de12cd84cf0a
Added a cgi-bin file that downloads zcode files from the IF archive.
Atul Varma <varmaa@toolness.com>
parents:
1
diff
changeset
|
1 import CGIHTTPServer |
de12cd84cf0a
Added a cgi-bin file that downloads zcode files from the IF archive.
Atul Varma <varmaa@toolness.com>
parents:
1
diff
changeset
|
2 import BaseHTTPServer |
1
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 |
78
de12cd84cf0a
Added a cgi-bin file that downloads zcode files from the IF archive.
Atul Varma <varmaa@toolness.com>
parents:
1
diff
changeset
|
6 Handler = CGIHTTPServer.CGIHTTPRequestHandler |
1
394ff157b665
Got Gnusto to load and 'run' a story file in web content.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
7 |
78
de12cd84cf0a
Added a cgi-bin file that downloads zcode files from the IF archive.
Atul Varma <varmaa@toolness.com>
parents:
1
diff
changeset
|
8 httpd = BaseHTTPServer.HTTPServer(("", PORT), Handler) |
1
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() |