Created Flask Example application for dokploy and added README.MD

This commit is contained in:
Mr1Blaze 2024-06-29 17:44:50 +03:00
parent cbe28ad17e
commit c68c194c8c
3 changed files with 55 additions and 0 deletions

1
Flask-Example/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/venv

42
Flask-Example/README.MD Normal file
View File

@ -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 <directory>
cd <directory>
```
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
```

12
Flask-Example/main.py Normal file
View File

@ -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)