This is a simple Flask application developed to demonstrate a restaurant reservation system. The application is developed using Python 3.9.7 and Flask 2.0.2.
- Fork this repository.
- Create a
Service
component in Choreo. - Deploy the component.
Invoke the following endpoints to test the application. Make sure to change the <endpoint-url>
to the URL of the deployed component.
curl -X GET <endpoint-url>/reservations
[{"reservationCreator": "John Doe", "reservationId": "1234", "contact": "011-123-4567"}, {"reservationCreator": "Jane Doe", "reservationId": "5678", "contact": "011-123-4562"}, {"reservationCreator": "John Smith", "reservationId": "9012", "contact": "011-123-4523"}]
curl -X GET <endpoint-url>/reservation/1234
Your reservation details: {"reservationCreator": "John Doe", "reservationId": "1234", "contact": "011-123-4567"}
curl -X POST -d '{"reservationCreator": "John Doe", "reservationId": "111", "contact": "011-123-1111"}' <endpoint-url>/reservation/1111
Your added reservation details: b'{"reservationCreator": "John Doe", "reservationId": "111", "contact": "011-123-1111"}'
curl -X PUT <endpoint-url>/reservation/1234 -d '{"reservationCreator": "Lahiru C", "reservationId": "1234", "contact": "011-123-4588"}'
Reservation updated: 1234
curl -X DELETE <endpoint-url>/reservation/1234
Reservation deleted: {"reservationCreator": "John Doe", "reservationId": "1234", "contact": "011-123-4567"}