We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74fd34c commit c938813Copy full SHA for c938813
Tools/scripts/serve.py
@@ -25,7 +25,7 @@ def app(environ, respond):
25
return [b'not found']
26
27
if __name__ == '__main__':
28
- path = sys.argv[1]
+ path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd()
29
port = int(sys.argv[2]) if len(sys.argv) > 2 else 8000
30
httpd = simple_server.make_server('', port, app)
31
print("Serving {} on port {}, control-C to stop".format(path, port))
0 commit comments