This repository contains the source code for the project 'webapp', a cloud-based backend web application developed for the course CSYE 6225: Network Structures and Cloud Computing, offered by Northeastern University and taken in Fall 2024.
The application is built using the following technologies, frameworks, and tools:
- Java JDK: Version 17
- Spring Boot: Version 3.3.3
- PostgreSQL: Version 16
- Spring Data JPA (Hibernate ORM)
- Gradle: Build tool
- Postman: To build and test APIs
To run the application, follow these steps:
-
Ensure prerequisites are installed:
- Java (JDK version 17)
- PostgreSQL (version 16)
-
Run the application:
- Navigate to the project directory in the command line.
- Execute the following command to start the application:
./gradlew bootRun
-
Build the application (optional):
- To build the application and generate a jar file, run the following command:
./gradlew clean build
- This command will clean old artifacts, run test cases, and generate a jar file in the
/build/libs
directory.
- To build the application and generate a jar file, run the following command:
-
Run the jar file:
- If you wish to run the application from the generated jar file, execute the following command:
java -jar <PATH_TO_JAR_FILE/JAR_FILE_NAME>
- If your terminal is already in the correct directory, the
<PATH_TO_JAR_FILE>
can be omitted.
- If you wish to run the application from the generated jar file, execute the following command:
While running locally, you can access the application at http://localhost:8080
. Below are the available endpoints:
GET: /healthz
- Does not require authentication.
- Returns
200 OK
if the connection to the database is healthy. - Returns
503 Service Unavailable
if the connection to the database is unsuccessful. - Returns
400 Bad Request
if an invalid request parameter or request body is provided.
POST: /healthz
- Returns
405 Method Not Allowed
PUT: /healthz
- Returns
405 Method Not Allowed
DELETE: /healthz
- Returns
405 Method Not Allowed
PATCH: /healthz
- Returns
405 Method Not Allowed
- This application uses Spring Data JPA for database interactions, with PostgreSQL serving as the backend database.
- API testing can be performed using Postman by hitting the listed endpoints.