diff --git a/.vscode/settings.json b/.vscode/settings.json index e5273f6..615aafb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "python.pythonPath": "/usr/local/opt/python/bin/python3.7" + "python.pythonPath": "/usr/bin/python3" } \ No newline at end of file diff --git a/server.py b/server.py index 4887828..c379fcc 100644 --- a/server.py +++ b/server.py @@ -21,13 +21,7 @@ } -def sha_hash(content): - if type(content) == str: - content = content.encode('utf-8') - m = hashlib.sha256() - m.update(content) - return m.hexdigest() - +sha_hash = downloader.sha_hash def mime(path): for i in mimetable: @@ -171,8 +165,8 @@ def make_app(): VideoHandler.smart_write = smart_reply VideoHandler.has_gzip = has_gzip -print("Server listening on {}".format(os.environ['PORT'])) +print("Server listening on {}".format(5000)) app = make_app() -app.listen(os.environ['PORT']) +app.listen(5000) tornado.ioloop.IOLoop.current().start()