Tawfiqh / gratitude_flask

Sample Flask API and accompanying front-end

Home Page:https://gratitude-py.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flask backend for gratitude app.

Run it locally

$ ./startServer.sh

s

Setup on heroku:

$ heroku config:set FLASK_ENV=production --app gratitude-py
$ heroku config:set FLASK_PASSWORD=SECRET --app gratitude-py

Setup python database:

$ heroku run python --app gratitude-py

Then in the python console:

>>> from api import db
>>> db.create_all()

for local:

export FLASK_APP=api.py
export FLASK_ENV=development
export FLASK_PASSWORD=abc
flask shell

and then run:

>>> from api import db
>>> db.create_all()

Can then create entries through command line easilly.

$ curl -G "https://gratitude-py.herokuapp.com/gratitude/submit" --data-urlencode "password=password" --data-urlencode "data=Warmth"

Seeing application logs on heroku

$ heroku logs --tail --app gratitude-py

About

Sample Flask API and accompanying front-end

https://gratitude-py.herokuapp.com/


Languages

Language:HTML 93.2%Language:Jupyter Notebook 3.2%Language:Python 3.0%Language:TypeScript 0.3%Language:JavaScript 0.3%Language:Shell 0.0%