DevOps-Calisma / acme-books

0 stars 0 forks source link

Creating Order Management Service #4

Open BeyzaAcar opened 2 weeks ago

BeyzaAcar commented 2 weeks ago
  1. Order Management Service Issue Title: Implement Order Management Service

Description: The Order Management Service will handle placing and managing customer orders. This service will allow users to create and track orders.

Tasks: Set up a Java application:

Use Java to create the Order Management service. Organize the project with a src/ directory for Java files, and templates for HTML forms. Create REST API for managing orders:

Implement a POST endpoint /create-order that accepts order details (e.g., order_id, user_id, item_id, quantity) and logs the order. Optionally, add a GET endpoint /list-orders to retrieve the list of orders. Build a simple HTML form for order creation:

Create order_form.html to allow users to create new orders via a form. Use JavaScript (script.js) to handle form submission and send data via a POST request to the /create-order endpoint. Run the service on a specified port:

Ensure the service runs on localhost:5004 or any available port. Include proper error handling for invalid order details. Acceptance Criteria: The /create-order API endpoint works correctly and returns a success response after logging the order details. The HTML form is functional and can create new orders. The service is ready for containerization.