koesan commited on
Commit
4c93eae
·
verified ·
1 Parent(s): e6d381d

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -11
main.py CHANGED
@@ -1903,14 +1903,5 @@ def perform_analysis(query):
1903
  return result
1904
 
1905
  if __name__ == "__main__":
1906
- with app.app_context():
1907
- db.create_all()
1908
- logger.info("Veritabanı başlatıldı")
1909
-
1910
- if SCAPY_AVAILABLE and os.name == "posix" and os.geteuid() != 0:
1911
- logger.warning("Scapy kullanımı için root yetkisi gerekli")
1912
-
1913
- if not NMAP_AVAILABLE:
1914
- logger.warning("NMAP desteği devre dışı")
1915
-
1916
- app.run(debug=True, host='0.0.0.0', port=5000)
 
1903
  return result
1904
 
1905
  if __name__ == "__main__":
1906
+ port = int(os.environ.get("PORT", 7860))
1907
+ app.run(host="0.0.0.0", port=port, debug=False)