something that works
This commit is contained in:
parent
186c7baa99
commit
41f5deea93
3
app.py
3
app.py
@ -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
|
||||
|
@ -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
|
||||
|
10
start.py
10
start.py
@ -4,9 +4,13 @@ from app import create_app
|
||||
|
||||
APP = create_app()
|
||||
|
||||
|
||||
@APP.route("/")
|
||||
def schedule_post():
|
||||
return "post scheduled!"
|
||||
def schedule_post():
|
||||
return "crunk-scheduler online!"
|
||||
|
||||
@APP.route("/schedule", methods=["POST"])
|
||||
return "post scheduled"
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run()
|
||||
APP.run()
|
||||
|
Loading…
Reference in New Issue
Block a user