()
| 5 | server = Flask(__name__) |
| 6 | |
| 7 | def get_db_connection(): |
| 8 | conn = psycopg2.connect(host=os.getenv('DATABASE_HOST'), |
| 9 | database=os.getenv('DATABASE_NAME'), |
| 10 | user=os.getenv('DATABASE_USER'), |
| 11 | password=os.getenv('DATABASE_PASSWORD'), |
| 12 | port=5432) |
| 13 | return conn |
| 14 | |
| 15 | |
| 16 | @server.route('/login', methods=['POST']) |