R
Railway

✋|help

Help running flask app

Ccordila4/3/2023
This is my first time using flask so bear with me... here is my app.py code
import mysql.connector
import logging
from flask import Flask, render_template, request

app = Flask(__name__)
app.logger.setLevel(logging.DEBUG)

@app.route('/')
def home():
return 'Hello, world!'

if __name__ == '__main__':
app.run(host='0.0.0.0', port=8080, debug=True)
import mysql.connector
import logging
from flask import Flask, render_template, request

app = Flask(__name__)
app.logger.setLevel(logging.DEBUG)

@app.route('/')
def home():
return 'Hello, world!'

if __name__ == '__main__':
app.run(host='0.0.0.0', port=8080, debug=True)
Just to test everything out, but when I visit the domain I generated it says 'Application error' Console:
* Serving Flask app 'app' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8080
* Running on http://xxx.xx.xx:8080
Press CTRL+C to quit
* Restarting with stat
* Debugger is active!
* Debugger PIN: xxx-xxx-xxx
* Serving Flask app 'app' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8080
* Running on http://xxx.xx.xx:8080
Press CTRL+C to quit
* Restarting with stat
* Debugger is active!
* Debugger PIN: xxx-xxx-xxx
PPercy4/3/2023
Project ID: aecdad28-da47-4b87-bfdd-d01e52a8beff
PPercy4/3/2023
⚠️ experimental feature
Ccordila4/3/2023
aecdad28-da47-4b87-bfdd-d01e52a8beff
BBrody4/3/2023
Ccordila4/3/2023
gotchu thanks
Ccordila4/3/2023
Just changing this fixed it lol.. why didnt what I do work tho
BBrody4/3/2023
no, please use the template I linked as a base, it uses gunicorn, you don't ever want to use flask's built in server on railway the logs even tell you not to do it twice!
Ccordila4/3/2023
Yeah this isnt really a large scale project, more of a college project really small scale, ill use gunicorn tho sure
BBrody4/3/2023
much appreciated, it's always a good idea to do things the right way even for small scale projects
Ccordila4/3/2023
👍

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts
railway run 🚨 Not authorized! but can't login``` ❯ yarn dx yarn run v1.22.19 $ railway run --service=app --environment=dev-$(whoami) run-p dx:* -Get an error when uploading a large file through my app: rror: abortedat connResetException```Error: aborted at connResetException (node:internal/errors:711:14) at abortIncoming (node:_http_sHow to connect to another instance without link a public domainI Want to connect with the app "browserless" but I don't want to expose this app for internet. I onlhttpOnly cookies not being set in production using koaHi, I'm trying to set httponly cookies in my koajs app but to no avail I have a custom domain in raSetting up MinIO serviceI set up a docker-orchestrated MinIO service locally. Given there is no service template available fMultiple services on a single domainHi! I have 3 services: API (Backend), Landing that uses this API (Frontend) and a Documentation for Deploy from GitHub Repo exits without reasonThis is for a Flask app, but I could see how it could get confused. What/why?Postgresql paused after month limit restoreHi, it´s supposed that datatabases should be restored after month limit, but my databases are still Card declinedYou have an unpaid invoice. Click here to pay your invoice in order to avoid disconnection of servicLong Running ProcessI have a process that takes a little over 40 minutes to complete and have it running once a day usinPostgres using too much memoryI am being overcharged due to my postgres instance, however I cannot restart it to free the memory. Can’t find tables after loading them in from local .sql file using command lineHello, not sure if this isn’t a common pattern(I may just end up using a Docker container for this).Abnormal memory usage on Postgresql pluginHello, I'm having an abnormal memory usage on my Postgresql database Any chance you can **restart Server logs?I am wondering how to inspect the application server logs. Doing `railway logs` just tails the mostA lil help with the pricing and plansi have a smol app. just a discord bot that used maybe 0.5 to 1 dollar last month. now to my understaRailway up errors with 413 payload too large with project size is 34,1 MB on diskAccording to the docs, the railway up command will fail for projects over 50MB, but my project size dayjs timezone invalid dateDoes anybody knows how I can make dayjs timezone plugin work in railway?Error: Cannot find module '/app/src/app.js' on deployi have this script on my package.json `"start": "cross-env NODE_ENV=production node ./src/app.js",`How to host my bot discord?Good evening, I would like to know how to host my bot discord. I have done everything as it should bCannot create code snapshot right nowPID: a45af505-1c73-4eb1-82a2-a15c9c5bd2f8 Hi guys, I'm getting this error repeatedly: `Cannot cre