From c68c194c8c58b08f70561e549c3fcd2aa3c492b7 Mon Sep 17 00:00:00 2001 From: Mr1Blaze Date: Sat, 29 Jun 2024 17:44:50 +0300 Subject: [PATCH] Created Flask Example application for dokploy and added README.MD --- Flask-Example/.gitignore | 1 + Flask-Example/README.MD | 42 ++++++++++++++++++++++++++++++++++++++++ Flask-Example/main.py | 12 ++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 Flask-Example/.gitignore create mode 100644 Flask-Example/README.MD create mode 100644 Flask-Example/main.py diff --git a/Flask-Example/.gitignore b/Flask-Example/.gitignore new file mode 100644 index 0000000..a979ee7 --- /dev/null +++ b/Flask-Example/.gitignore @@ -0,0 +1 @@ +/venv \ No newline at end of file diff --git a/Flask-Example/README.MD b/Flask-Example/README.MD new file mode 100644 index 0000000..b04330a --- /dev/null +++ b/Flask-Example/README.MD @@ -0,0 +1,42 @@ +# 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](https://www.python.org/). + +### Setup + +1. Make dir and go to directory: + + ```bash + mkdir + cd + ``` +2. Create and activate a virtual environment: + ```bash + python3 -m venv venv + ``` + Activate the virtual environment: + On windows: + ```bash + venv\Scripts\activate + ``` + On macOS/Linux: + ```bash + source venv/bin/activate + ``` +3. Install dependencies: + ```bash + pip install -r requirements.txt + ``` + +4. Running the Application: + ```bash + python main.py + ``` \ No newline at end of file diff --git a/Flask-Example/main.py b/Flask-Example/main.py new file mode 100644 index 0000000..0a32f20 --- /dev/null +++ b/Flask-Example/main.py @@ -0,0 +1,12 @@ +from flask import Flask + +app = Flask(__name__) + + +@app.route('/') +def hello_world(): + return 'Hello, World!' + + +if __name__ == '__main__': + app.run(debug=False, ip="0.0.0.0", port=5000)