Added wsgi script

This commit is contained in:
sqozz 2016-02-10 23:30:52 +01:00
parent 072321dcbe
commit ae96b0c268
2 changed files with 5 additions and 1 deletions

View File

@ -28,7 +28,7 @@ def short(shortLink=""):
def insertIdUnique(idToCheck, longUrl):
hashUrl = hashlib.sha256(longUrl.encode()).digest()
base64Url = base64.b64encode(hashUrl).decode()
base64Url = base64.urlsafe_b64encode(hashUrl).decode()
if len(idToCheck) == 0:
idToCheck = base64Url[:4]

4
schort.wsgi Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import schort
application = schort.app.wsgi_app