This commit is contained in:
Alexandr Godless
2018-02-19 17:22:55 +03:00
parent 97ed251351
commit 4feaaa4a20
12 changed files with 79 additions and 21 deletions

40
main.py Normal file → Executable file
View File

@ -1,20 +1,20 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from webhook import WebHook
import settings
import signal
import sys
# catch ctrl+c
def signal_handler(signal, frame):
print('Exiting...')
settings.db.close()
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)
wh = WebHook(
certfile = 'assets/cert.pem',
keyfile='assets/cert.key',
port=8080)
wh.serve()
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from webhook import WebHook
import settings
import signal
import sys
# catch ctrl+c
def signal_handler(signal, frame):
print('Exiting...')
settings.db.close()
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)
wh = WebHook(
certfile = 'assets/cert.pem',
keyfile='assets/cert.key',
port=8443)
wh.serve()