This is a simple Flask API that can store and retrieve data.
POST /api/data
: Store new dataGET /api/data
: Retrieve the latest stored data
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
The server will start at http://localhost:5000
curl -X POST -H "Content-Type: application/json" -d '{"message":"Hello World"}' http://localhost:5000/api/data
curl http://localhost:5000/api/data