Update README.md (#53)

* Update README.md

* flask
This commit is contained in:
Andras Bacsai
2025-09-25 11:26:30 +02:00
committed by GitHub
parent 6457a95887
commit 269ae91c9b
9 changed files with 89 additions and 0 deletions

View File

@@ -24,3 +24,5 @@ This repository contains examples of how to deploy applications using Coolify.
- [ ] PHP
- [ ] React/Preact/Vue/Vite/Svelte
asd

4
flask/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
.venv
__pycache__/
.DS_Store
*.sqlite3

56
flask/README.md Normal file
View File

@@ -0,0 +1,56 @@
# flask-minimal
A minimal Flask starter project designed to help you quickly set up a clean, simple, and efficient web application. This project is structured to keep things lightweight and focuses on productivity, with all your code contained in a single file (`app.py`), along with basic templates and static assets.
## Features
- Single-file Flask application (`app.py`) to maximize productivity and simplicity.
- Basic HTML template structure with minimal styling and JavaScript.
- Simple and intuitive project setup with no unnecessary complexity.
- Easily customizable for rapid development of web applications.
## Installation
1. Clone the repository:
```bash
git clone https://github.com/yourusername/flask-minimal.git
cd flask-minimal
```
2. Create a virtual environment (recommended):
```bash
python3 -m venv .venv
source venv/bin/activate
```
3. Install the required dependencies:
```bash
pip install -r requirements.txt
```
4. Run the app:
```bash
python app.py
```
The Flask app will start, and you can view it by navigating to http://localhost:5000 in your browser.
## Usage
This starter project is ready to be used as a foundation for building web applications. The app.py file contains all the Flask routes and logic, making it simple to expand and customize. You can add more templates, routes, or static files as needed.
## Customization
You can easily modify:
- The HTML structure in `templates/index.html`
- The styling in `static/style.css`
- The interactivity in `static/script.js`
Feel free to update the app.py file to add your routes or any additional logic to fit your needs.
## License
This project is licensed under the MIT License.
## Contributing
Feel free to fork this repository and create pull requests if you have improvements or bug fixes. If you have any suggestions, open an issue, and well discuss it!
This project is built with simplicity and efficiency in mind, perfect for quickly starting small web apps or prototypes with minimal overhead.

10
flask/app.py Normal file
View File

@@ -0,0 +1,10 @@
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def home():
return render_template("index.html")
if __name__ == "__main__":
app.run(debug=True)

5
flask/nixpacks.toml Normal file
View File

@@ -0,0 +1,5 @@
[phases.install]
commands = ["pip install -r requirements.txt"]
[phases.start]
command = "flask run --host=0.0.0.0 --port=5000"

1
flask/requirements.txt Normal file
View File

@@ -0,0 +1 @@
flask

0
flask/static/script.js Normal file
View File

0
flask/static/style.css Normal file
View File

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<script src="{{ url_for('static', filename='script.js') }}" defer></script>
<title>Minimal Flask App</title>
</head>
<body>
<h1>Hello, Flask!</h1>
</body>
</html>