Skip to content

Commit

Permalink
app attribute created.
Browse files Browse the repository at this point in the history
temp main response created
  • Loading branch information
nimaafshar committed Apr 10, 2020
1 parent e202b5a commit 3b58d6d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: gunicorn app:app
web: gunicorn app:app
6 changes: 4 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def create_app(environment='Development'):
if __name__ == '__main__':
env = getenv('DAILYDIET_ENV')
if env is None:
create_app().run()
app = create_app()
else:
create_app(env).run()
app = create_app(env)

app.run()
6 changes: 6 additions & 0 deletions calculator/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
calculator = Blueprint('calculator', __name__)


# temporary todo:remove temp main
@calculator.route('/', methods=['GET'])
def temp_main():
return '<h1>daily diet api</h1>'


@calculator.route('/calculator/bmi', methods=['POST'])
def calculate_bmi():
form = BMIForm()
Expand Down

0 comments on commit 3b58d6d

Please sign in to comment.