muhammadshaheryar commited on
Commit
9e2c970
·
verified ·
1 Parent(s): ea4a9ec

Update api.py

Browse files
Files changed (1) hide show
  1. api.py +3 -1
api.py CHANGED
@@ -127,4 +127,6 @@ def document_count():
127
 
128
 
129
  if __name__ == '__main__':
130
- app.run(debug=True, host='0.0.0.0', port=5000)
 
 
 
127
 
128
 
129
  if __name__ == '__main__':
130
+ # Get port from environment variable, default to 5000 for local development
131
+ port = int(os.environ.get('PORT', 5000))
132
+ app.run(debug=True, host='0.0.0.0', port=port)