WaspW
Wasp15mo ago
DanjelDurmo

Flask server in wasp

Hello everyone, in src/server i have put the file main.py that contains:
from flask import Flask
from richestBtc import richestBtc_bp

app = Flask(__name__)

app.register_blueprint(richestBtc_bp, url_prefix='/richestBtc')

if __name__ == '__main__':
    app.run(debug=True, host='127.0.0.1', port=5000)

And by running python main.py everything works well.
But how can run this in production? I use caddy at the moment:

datanext.app {
        root * /var/www/html
        encode gzip
        try_files {path} /index.html
        file_server
}

api.datanext.app {
        reverse_proxy localhost:3001
}

Any idea on how running python main.py in prod? Thanks you
Screenshot_2024-10-19_alle_17.16.33.png
image.png
image.png
image.png
image.png
image.png
Was this page helpful?