mirror of
https://github.com/Dokploy/examples
synced 2025-06-26 18:15:52 +00:00
Created Flask Example application for dokploy and added README.MD
This commit is contained in:
parent
cbe28ad17e
commit
c68c194c8c
1
Flask-Example/.gitignore
vendored
Normal file
1
Flask-Example/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/venv
|
42
Flask-Example/README.MD
Normal file
42
Flask-Example/README.MD
Normal 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
12
Flask-Example/main.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user