Code Monkey home page Code Monkey logo

akkiepro / microservice-quiz-app Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 281 KB

Quiz App using different microservices such as question-service, quiz-service, service-registry and an api-gateway-service.

Home Page: https://github.com/akkiePro/Monolithic-Quiz-App

Java 100.00%
microservice microservices-architecture java postgresql spring spring-boot sql rest rest-api restful-api api-gateway eureka eureka-client eureka-server service-registry question-service quiz-service curl postman

microservice-quiz-app's Introduction

Microservice-Quiz-App

Quiz App using different microservices such as question-service, quiz-service, service-registry and an api-gateway-service.

Postman cURLs

  1. generateQuiz
    curl --location 'localhost:8765/quiz-service/quiz/generate'
    --header 'Content-Type: application/json'
    --data '{ "category":"Java", "limit":10, "title":"Java Guy" }'



2. generateQuizQuestions
curl --location 'localhost:8765/quiz-service/quiz/getQuiz/1'



3. getResult
curl --location --request GET 'localhost:8765/quiz-service/quiz/getScore'
--header 'Content-Type: application/json'
--data '[ { "rid":2, "response": "A programming language" }, { "rid":4, "response": "A value that has a name and a type" }, { "rid":7, "response": "A blueprint for creating objects" }, { "rid":11, "response": "The ability of an object to take on many forms" }, { "rid":20, "response": "A structure that repeats a block of code" } ]'



4. getAllQuestions
curl --location 'localhost:8765/question-service/question/getAllQuestions'



5. getAllQuestionsByCategory
curl --location 'localhost:8765/question-service/question/category/Java'



6. addQuestion
curl --location 'localhost:8765/question-service/question/addQuestion'
--header 'Content-Type: application/json'
--data '{ "questionTitle":"What is the default scope of the Spring Bean?", "option1":"singleton", "option2":"prototype", "option3":"request", "option4":"session", "correctAnswer":"singleton", "category":"Java", "difficultyLevel":"Medium" }'



7. updateQuestion
curl --location --request PUT 'localhost:8765/question-service/question/update/1'
--header 'Content-Type: application/json'
--data '{ "questionTitle": "What is size of int in java? (in Bytes)", "option1": 1, "option2": 2, "option3": 4, "option4": 8, "correctAnswer": 4, "category": "Java", "difficultyLevel": "Easy" }'



8. deleteQuestion
curl --location --request DELETE 'localhost:8765/question-service/question/delete/22'
--data ''



9. generateQuestionsForQuiz
curl --location --request GET 'localhost:8765/question-service/question/generate?category=Python&limit=10'
--header 'Content-Type: application/x-www-form-urlencoded'
--data-urlencode 'category=Java'
--data-urlencode 'limit=5'



10. generateQuestionsByIds
curl --location 'localhost:8765/question-service/question/getQuestions'
--header 'Content-Type: application/json'
--data '[10,16,3,18,19,21,6,12,8,14]'



11. score
curl --location 'localhost:8765/question-service/question/getScore'
--header 'Content-Type: application/json'
--data '[ { "rid":2, "response": "A programming language" }, { "rid":4, "response": "A value that has a name and a type" }, { "rid":7, "response": "A blueprint for creating objects" }, { "rid":11, "response": "The ability of an object to take on many forms" }, { "rid":20, "response": "A structure that repeats a block of code" } ]'

Eureka-Server setup

image

Monolithic-Quiz-App

Monolithic-Quiz-App

learnt from: https://www.youtube.com/watch?v=Jl9OKQ92SJU&ab_channel=Telusko

microservice-quiz-app's People

Contributors

akkiepro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.