geethareddy commited on
Commit
5fe5b47
·
verified ·
1 Parent(s): ea580b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -2,9 +2,10 @@ from flask import Flask, render_template, request
2
  from simple_salesforce import Salesforce
3
  import os
4
 
 
5
  app = Flask(__name__)
6
 
7
- # Salesforce credentials
8
  SF_USERNAME = os.getenv("SF_USERNAME", "diggavalli98@gmail.com")
9
  SF_PASSWORD = os.getenv("SF_PASSWORD", "Sati@1020")
10
  SF_SECURITY_TOKEN = os.getenv("SF_SECURITY_TOKEN", "sSSjyhInIsUohKpG8sHzty2q")
@@ -31,6 +32,6 @@ def menu():
31
 
32
  return render_template("menu.html", food_items=food_items, categories=categories, selected_category=selected_category)
33
 
34
- # In production, Gunicorn will take care of app running. No need for app.run() here
35
  if __name__ == "__main__":
36
- pass # Gunicorn will handle running the application in production
 
2
  from simple_salesforce import Salesforce
3
  import os
4
 
5
+ # Initialize Flask app
6
  app = Flask(__name__)
7
 
8
+ # Salesforce credentials (Use environment variables for security in production)
9
  SF_USERNAME = os.getenv("SF_USERNAME", "diggavalli98@gmail.com")
10
  SF_PASSWORD = os.getenv("SF_PASSWORD", "Sati@1020")
11
  SF_SECURITY_TOKEN = os.getenv("SF_SECURITY_TOKEN", "sSSjyhInIsUohKpG8sHzty2q")
 
32
 
33
  return render_template("menu.html", food_items=food_items, categories=categories, selected_category=selected_category)
34
 
35
+ # Gunicorn will automatically find this app instance and run it
36
  if __name__ == "__main__":
37
+ app.run(debug=True) # Only used in development, not in production