mirror of
https://github.com/house-of-vanity/conf_bot.git
synced 2025-07-06 14:24:08 +00:00
Init commit
This commit is contained in:
20
main.py
Normal file
20
main.py
Normal 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()
|
Reference in New Issue
Block a user