Skip to content

Commit

Permalink
flasking this app
Browse files Browse the repository at this point in the history
  • Loading branch information
tblanarik committed Nov 11, 2024
1 parent cf1b5ba commit 261c199
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
from flask import Flask
import uuid
import os
from flask import Flask, request, make_response
import logging
import spotbot as sb
import tables
import discord_http
app = Flask(__name__)

@app.route(f'/message')
def run():
return f'Hello world'
try:
sb.SpotBot(request, tables.HamAlertTable(), discord_http.DiscordHttp()).process()
except Exception as _excpt:
logging.error(f"Exception occurred: {_excpt}")
return make_response(f"Exception occurred: {_excpt}", 500)
else:
return make_response("Accepted", 202)

if __name__ == "__main__":
app.run()

0 comments on commit 261c199

Please sign in to comment.