From f2594a244961d1447429f8ef208452919bfbe7fc Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Sat, 19 Oct 2024 02:59:48 +0500 Subject: [PATCH] run on 0.0.0.0, added python shebang --- api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) mode change 100644 => 100755 api.py diff --git a/api.py b/api.py old mode 100644 new mode 100755 index bcbd554..fc8766b --- a/api.py +++ b/api.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + from flask import Flask, request, jsonify import subprocess import json @@ -73,4 +75,5 @@ def verify_payment(): if __name__ == '__main__': debug_mode = os.getenv('APP_DEBUG', 'False').lower() in ('true', '1', 't') - app.run(debug=debug_mode) + port = int(os.getenv('PORT', 5000)) + app.run(host='0.0.0.0', port=port, debug=debug_mode)