This is a basic Flask backend project.
- Python 3.x
- Flask
-
Clone the repository:
git clone https://github.com/yourusername/your-repo.git cd your-repo -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install Flask
-
Set the FLASK_APP environment variable:
export FLASK_APP=app.py # On Windows use `set FLASK_APP=app.py`
-
Run the Flask application:
flask run
-
Open your browser and navigate to
http://127.0.0.1:5000/.
/your-repo
│
├── app.py
├── requirements.txt
├── venv/
└── README.md
app.py:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello, World!'
if __name__ == '__main__':
app.run()This project is licensed under the MIT License.