#Exposing the app
17 messages · Page 1 of 1 (latest)
Project ID: N/A
The easiest way to get up and running is to have your application listen on 0.0.0.0:$PORT, where PORT is a Railway-provided environment variable. Alternatively, you can manually override the PORT environment variable by adding PORT to your projects variables page. (Command + K and type Variables or you can use the keyboard shortcut: G + V under your selected project).
When I write PORT : 0.0.0.0 under variables and try to redeploy my app, I get the error meassge that the variable should be an integer. Would you give me the exact notation?
show me the bit of code that starts the flask server please
if name == 'main':
app.run(debug=True, port=os.getenv("PORT", default=5000)
please reference the flask template for railway
https://github.com/railwayapp-templates/flask/blob/main/main.py
I've got this bit of code from railway's flask template anyway
And put it in my code
your code is different, "name" is not defined
also missing a closing parentheses but i think thats just a copying mistake when you sent it here