Added wsgi script
This commit is contained in:
parent
072321dcbe
commit
ae96b0c268
2 changed files with 5 additions and 1 deletions
|
@ -28,7 +28,7 @@ def short(shortLink=""):
|
||||||
|
|
||||||
def insertIdUnique(idToCheck, longUrl):
|
def insertIdUnique(idToCheck, longUrl):
|
||||||
hashUrl = hashlib.sha256(longUrl.encode()).digest()
|
hashUrl = hashlib.sha256(longUrl.encode()).digest()
|
||||||
base64Url = base64.b64encode(hashUrl).decode()
|
base64Url = base64.urlsafe_b64encode(hashUrl).decode()
|
||||||
if len(idToCheck) == 0:
|
if len(idToCheck) == 0:
|
||||||
idToCheck = base64Url[:4]
|
idToCheck = base64Url[:4]
|
||||||
|
|
||||||
|
|
4
schort.wsgi
Executable file
4
schort.wsgi
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
import schort
|
||||||
|
application = schort.app.wsgi_app
|
Loading…
Reference in a new issue