Files
github-webhook-to-telegram/config.py
T
Shrimadhav U K bdfc0135eb Add Heroku support (#1)
* Create Procfile

* Create config.py

* Create runtime.txt

* Create app.json

* Add "Deploy to Heroku" button to README.md

Co-authored-by: Dash Eclipse <dashezup@disroot.org>
2021-04-22 03:39:34 +00:00

14 lines
308 B
Python

import json
from os import environ
if environ.get('DYNO'):
data = json.loads(environ.get("HOOK_CONFIG"))
PORT = int(environ.get('PORT'))
else:
with open("config.json") as f:
data = json.load(f)
PORT = data.get('port')
BOT_TOKEN = data['bot_token']
GH_WEBHOOKS = data['gh_webhooks']