Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"python.pythonPath": "/usr/local/opt/python/bin/python3.7"
"python.pythonPath": "/usr/bin/python3"
}
12 changes: 3 additions & 9 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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()