Skip to content

itsmitul9/mitul-webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Start the Application

  1. Clone the Repository:

    git clone https://github.com/itsmitul9/mitul-webapp.git
    cd mitul-webapp
  2. 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.

API Endpoints

/app/status

  • 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
    }

/app/replicas

  • 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"
    }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages