-
Clone the Repository:
git clone https://github.com/itsmitul9/mitul-webapp.git cd mitul-webapp
-
Run the Application:
chmod +x webapp ./webapp --port=8123
The application will start on port 8123 by default. You can change the port by using the
--port
flag.
- Method:
GET
- Description: Returns the current status of the application, including CPU usage and the number of replicas.
- Response:
{ "cpu": { "highPriority": 0.68 }, "replicas": 10 }
- Method:
PUT
- Description: Updates the number of replicas based on the provided JSON payload.
- Request Body:
{ "replicas": 11 }
- Response:
$ curl -X PUT -H "Content-Type: application/json" -d '{"replicas": 11}' http://localhost:8123/app/replicas
{ "message": "Replicas updated" }