feat: complete issue #1
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
*.pyc
|
||||||
|
__pycache__/
|
||||||
|
venv/
|
||||||
@@ -1,3 +1,44 @@
|
|||||||
# hello-world
|
# hello-world
|
||||||
|
|
||||||
An empty starter repository for testing Zopu's issue-to-pull-request workflow.
|
---
|
||||||
|
|
||||||
|
## Hello World API
|
||||||
|
|
||||||
|
This repository contains a minimal **Python** Flask application exposing a single endpoint:
|
||||||
|
|
||||||
|
```
|
||||||
|
GET /hello
|
||||||
|
```
|
||||||
|
|
||||||
|
It responds with a short JSON greeting.
|
||||||
|
|
||||||
|
### Quick start
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# install dependencies
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
# run the server
|
||||||
|
python server.py
|
||||||
|
```
|
||||||
|
|
||||||
|
The service will be available at <http://localhost:5000/hello>.
|
||||||
|
|
||||||
|
### Expected output
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ curl -s http://localhost:5000/hello
|
||||||
|
{"message":"Hello, world!"}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> **Note**: No external configuration is required.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Project overview
|
||||||
|
|
||||||
|
This is a simple skeleton used for testing the Zopu issue‑to‑PR workflow. If you wish to report an issue or contribute, feel free to open a pull request.
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
flask
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Simple Hello World API.
|
||||||
|
|
||||||
|
Run with:
|
||||||
|
python3 server.py
|
||||||
|
|
||||||
|
It will start a Flask server listening on http://127.0.0.1:5000/hello
|
||||||
|
|
||||||
|
The endpoint returns JSON:
|
||||||
|
{"message": "Hello, world!"}
|
||||||
|
"""
|
||||||
|
|
||||||
|
from flask import Flask, jsonify
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
@app.route("/hello", methods=["GET"])
|
||||||
|
def hello():
|
||||||
|
return jsonify(message="Hello, world!")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app.run(host="0.0.0.0", port=5000, debug=True)
|
||||||
Reference in New Issue
Block a user