This App is used for testing deployment using Kubernetes (K8s), Jenkins, Docker... This Spring Boot application has two Endpoints :
-
Restfull api Endpoint:
- Endpoint:
/api
- Functionality: Provides information about the operating system, host IP, and current CPU load. This information can be accessed through appropriate API calls.
- Endpoint:
-
Static Website Serving:
- Endpoint:
/
- Functionality: Serves a static website. Users can access the website by navigating to the root URL. The website might contain various HTML, CSS, and JavaScript files, along with other assets, necessary for the website's functionality and appearance.
- Endpoint:
- Java Development Kit (JDK) 17 or higher
- Maven
To run the Iampod Application, follow these steps:
-
Clone the repository:
-
Navigate to the project directory:
cd iampod
-
Build the project using Maven:
mvn clean install
-
Run the application using Maven:
mvn spring-boot:run
or
mvn spring-boot:run -Dspring-boot.run.arguments=--server.port=8080
-
The application will start and be accessible at http://localhost:8080/.
-
You can also get the response from the terminal using curl
curl -s http://localhost:8080/api | jq
- Access http://localhost:8080/ in your web browser to view the system information provided by the application.
to build it
cd springboot-iampod
docker build -t springboot-iampod .
docker run --rm --name iampod -p 8080:8080 springboot-iampod
- Make sure no other application is using port 8080 before starting this application.
- This application fetches the operating system information, host IP, and current CPU load when accessed at the root URL.
- Customize the application as needed for your use case.
This project is licensed under the MIT License.