Files
examples/Flask-Example
Andrea Arturo Venti Fuentes c107ac55ea Fix incorrect ip argument in app.run()
Replaced `ip="0.0.0.0"` with `host="0.0.0.0"` in `main.py` to fix a TypeError during Flask startup.

This change ensures compatibility with Flask's app.run() parameters and allows the app to bind to all interfaces as expected in production environments like Dokploy.

```
Traceback (most recent call last):
File "/app/main.py", line 12, in <module>
app.run(debug=False, ip="0.0.0.0", port=5000)
File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 625, in run
* Serving Flask app 'main'
* Debug mode: off
run_simple(t.cast(str, host), port, self, **options)
TypeError: run_simple() got an unexpected keyword argument 'ip'
```
2025-06-04 17:36:51 -04:00
..
2025-06-04 17:36:51 -04:00
2024-06-29 17:48:07 +03:00

Flask Application Examples

This repository contains a Flask application along with necessary setup instructions.

Installation

Follow these steps to set up and install the Flask application:

Prerequisites

  • Python 3.x installed on your system. You can download Python from python.org.

Setup

  1. Make dir and go to directory:

    mkdir <directory>
    cd <directory>
    
  2. Create and activate a virtual environment:

    python3 -m venv venv
    

    Activate the virtual environment: On windows:

    venv\Scripts\activate
    

    On macOS/Linux:

    source venv/bin/activate
    
  3. Install dependencies:

     pip install -r requirements.txt
    
  4. Running the Application:

     python main.py