This is a Spring Boot application that allows users to create and participate in timed quizzes. It provides a RESTful API for managing quizzes.
- Create a quiz by sending a POST request to
/quizzes
. - Retrieve the active quiz by sending a GET request to
/quizzes/active
. - Retrieve the result of a quiz by its ID using the GET request
/quizzes/{id}/result
. - Retrieve all quizzes using the GET request
/quizzes/all
.
- Java
- Spring Boot
- PostgreSQL
- Java 8 or higher
- PostgreSQL database
- Maven
-
Clone the repository:
git clone https://github.com/your-username/quiz-application.git
-
Configure the database connection in the application.properties file
-
Build the application:
cd quizapp ./mvnw clean package
-
Run the application:
./mvnw spring-boot:run
-
The application will start running at http://localhost:8080.
- POST /quizzes: Create a new quiz.
- GET /quizzes/active: Retrieve the active quiz.
- GET /quizzes/{id}/result: Retrieve the result of a quiz by its ID.
- GET /quizzes/all: Retrieve all quizzes.