Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions API/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,18 @@ def setSession():


if __name__ == '__main__':
# if __name__ == 'app':
#potrebno radi module js importa u index.html ES6 modules
#Flask.__version__
import mimetypes
mimetypes.add_type('application/javascript', '.js')

port = int(os.environ.get("PORT", 5002))
print("PORTTTTTTTTTTT")
if Config.HEROKU_DEPLOY == 0:
#localhost
#app.run(host='127.0.0.1', port=port, debug=True)
#waitress server
#prod server

print(f"\nStarting MUIOGO server on http://127.0.0.1:{port}")
print("Press CTRL+C to stop the server\n")

if Config.HEROKU_DEPLOY == 0:
# Local development (Waitress)
from waitress import serve
serve(app, host='127.0.0.1', port=port)
else:
#HEROKU
app.run(host='0.0.0.0', port=port, debug=True)
#app.run(host='127.0.0.1', port=port, debug=True)

# Heroku deployment
app.run(host='0.0.0.0', port=port, debug=True)