something that works

This commit is contained in:
crunk 2023-07-19 21:36:31 +02:00
parent 186c7baa99
commit 41f5deea93
3 changed files with 12 additions and 3 deletions

3
app.py
View File

@ -6,3 +6,6 @@ def create_app():
APP = Flask(__name__)
scheduler = flask_apscheduler.APScheduler()
scheduler.api_enabled = True
scheduler.init_app(APP)
scheduler.start()
return APP

View File

@ -5,6 +5,7 @@ blinker==1.6.2
click==8.1.5
feedgenerator==2.1.0
Flask==2.3.2
Flask-APScheduler==1.12.4
Flask-Migrate==4.0.4
Flask-Scheduler==0.0.51
Flask-SQLAlchemy==3.0.5
@ -18,6 +19,7 @@ mypy-extensions==1.0.0
packaging==23.1
pathspec==0.11.1
platformdirs==3.9.1
python-dateutil==2.8.2
pytz==2023.3
six==1.16.0
SQLAlchemy==2.0.19

View File

@ -4,9 +4,13 @@ from app import create_app
APP = create_app()
@APP.route("/")
def schedule_post():
return "post scheduled!"
return "crunk-scheduler online!"
@APP.route("/schedule", methods=["POST"])
return "post scheduled"
if __name__ == "__main__":
app.run()
APP.run()