Show More
@@ -37,9 +37,12 b' class ServePostProcessor(PostProcessorBase):' | |||||
37 | Simple implementation to serve the build directory. |
|
37 | Simple implementation to serve the build directory. | |
38 | """ |
|
38 | """ | |
39 |
|
39 | |||
|
40 | try: | |||
40 | os.chdir(self.build_directory) |
|
41 | os.chdir(self.build_directory) | |
41 | httpd = HTTPServer(('127.0.0.1', 8000), SimpleHTTPRequestHandler) |
|
42 | httpd = HTTPServer(('127.0.0.1', 8000), SimpleHTTPRequestHandler) | |
42 | sa = httpd.socket.getsockname() |
|
43 | sa = httpd.socket.getsockname() | |
43 |
print("Serving |
|
44 | print("Serving " + input[2:] + " on http://" + sa[0] + ":" + str(sa[1])) | |
44 | print("Use Control-C to stop this server.") |
|
45 | print("Use Control-C to stop this server.") | |
45 | httpd.serve_forever() |
|
46 | httpd.serve_forever() | |
|
47 | except KeyboardInterrupt: | |||
|
48 | print("The server is shut down.") |
General Comments 0
You need to be logged in to leave comments.
Login now