Init commit

This commit is contained in:
House of vanity
2018-02-04 07:13:09 +03:00
committed by GitHub
parent 1444638e23
commit ea2be1f23f
9 changed files with 764 additions and 0 deletions

20
main.py Normal file
View File

@ -0,0 +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()