diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-07-11 13:19:18 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-07-11 13:19:18 +1000 |
| commit | 7a28e15874796b3becf97c0193575d906d0cfd01 (patch) | |
| tree | 20c679fb7167c18009a697f0d3db7bed1d1b409c /backend/server.py | |
| parent | 5fe71ea7b9d9a5d2dc6e8e5ce5b9193629eed74d (diff) | |
Update backend documentation
Diffstat (limited to 'backend/server.py')
| -rwxr-xr-x | backend/server.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/server.py b/backend/server.py index 5e0b80f..b2fffdc 100755 --- a/backend/server.py +++ b/backend/server.py @@ -14,6 +14,7 @@ if len(sys.argv) > 1: print(usageInfo, file=sys.stderr) sys.exit(1) +# WSGI handler that uses 'application', but also serves image files def wrappingApp(environ, start_response): urlPath = environ["PATH_INFO"] if urlPath.startswith("/data/"): @@ -32,7 +33,7 @@ def wrappingApp(environ, start_response): else: start_response("404 Not Found", [("Content-type", "text/plain")]) return [b"Unrecognised path"] - +# Start server with simple_server.make_server('', 8000, wrappingApp) as httpd: print("Serving HTTP on port 8000...") httpd.serve_forever() |
