allow specifying port for the API to listen on

This commit is contained in:
Brian S. Stephan 2018-01-10 12:47:47 -06:00
parent 51edb54ed7
commit 00645e8d93
2 changed files with 3 additions and 1 deletions

View File

@ -44,7 +44,7 @@ class Command(BaseCommand):
def handle(self, *args, **options):
loop = asyncio.get_event_loop()
handler = hitomi_api.make_handler()
api_server = loop.create_server(handler, '0.0.0.0', 8080)
api_server = loop.create_server(handler, '0.0.0.0', settings.API_PORT)
futures = asyncio.gather(run_bot(), api_server)
try:
loop.run_until_complete(futures)

View File

@ -135,6 +135,8 @@ WEATHER_WEATHER_UNDERGROUND_API_KEY = 'key'
BOT_PLUGINS = []
API_PORT = 7777
# get local settings