mirror of
https://github.com/Kizuren/uLinkShortener.git
synced 2025-12-21 21:16:17 +01:00
Add PORT configuration to environment and update server to use it
This commit is contained in:
parent
e86ee24506
commit
b131756235
2 changed files with 3 additions and 1 deletions
|
|
@ -1 +1,2 @@
|
||||||
MONGO_URI=mongodb://localhost:27017/uLinkShortener
|
MONGO_URI=mongodb://localhost:27017/uLinkShortener
|
||||||
|
PORT=5000
|
||||||
|
|
@ -179,4 +179,5 @@ def delete_link(short_id):
|
||||||
return jsonify({'success': True})
|
return jsonify({'success': True})
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(debug=True, host="0.0.0.0", port=5000)
|
port = int(os.getenv("PORT", 5000))
|
||||||
|
app.run(debug=True, host="0.0.0.0", port=port)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue