{"id":21186805,"url":"https://github.com/emmanuelaaron/02_trivia","last_synced_at":"2025-03-14T20:18:55.303Z","repository":{"id":52157120,"uuid":"221915967","full_name":"Emmanuelaaron/02_trivia","owner":"Emmanuelaaron","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-02T06:41:13.000Z","size":185,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T13:06:59.752Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Emmanuelaaron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-15T12:04:20.000Z","updated_at":"2020-02-26T23:13:21.000Z","dependencies_parsed_at":"2023-02-17T15:45:36.339Z","dependency_job_id":null,"html_url":"https://github.com/Emmanuelaaron/02_trivia","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emmanuelaaron%2F02_trivia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emmanuelaaron%2F02_trivia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emmanuelaaron%2F02_trivia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emmanuelaaron%2F02_trivia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Emmanuelaaron","download_url":"https://codeload.github.com/Emmanuelaaron/02_trivia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243639558,"owners_count":20323511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T18:26:21.238Z","updated_at":"2025-03-14T20:18:55.256Z","avatar_url":"https://github.com/Emmanuelaaron.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trivia\n## Getting Started\n### Prerequisites and local storage\nDevelopers contributing to this product should have the following installed on their local machines\n- python3\n- pip \n- node\n- virtualenv\n\n#### Backend\n- cd into the backend directory \u003cbr/\u003e\n`$ cd backend`\n- create a virtual environment and activate it using the command below \u003cbr/\u003e\n`$ virtualenv venv ` \u003cbr/\u003e\n`$ source venv/Scripts/activate`\n- Install all the dependencies within the requirements file using the command below \u003cbr /\u003e\n`$ pip install -r requirements.txt`\n- To Run the application use the following commands \u003cbr /\u003e\n`$ export FLASK_APP=flaskr`\n`$ export FLASK_ENV=development`\n`$ flask run`\nBy default the applucation is run on http://127.0.0.1:5000/\n* copy the Url it into postman and put to run any endpoint of your preference in the table below \n\nHTTP Method | Endpoint | Functionality | Parameters \n------------|----------|---------------|------------\nGET | / | Getting all available categories | None\nGET | /questions | Getting all questions | None\nDELETE | /questions/question_id |Deletes a question using an id | question_id\nPOST | /questions| Creates a question| None\nPOST | /questions/search | Getting questions basing on a search term | None\nGET | /categories/category_id/questions | Getting questions based on category | category_id\n\nTo post a question, the data should be in this format\n```\n{\n\t\"question\": \"question\",\n\t\"answer\": \"answer\",\n\t\"category\": category,\n\t\"difficulty\": category\n}\n``` \n\u003cbr /\u003e\nTo search for a question, the data should be in this format. \u003cbr /\u003e\n`\n{\n\t\"question\": search_word\n}\n`\n\n### Frontend\n- cd into the frontend directory \u003cbr /\u003e\n`$ cd frontend`\n- Install all the dependencies using the command below\n`$ npm install`\n- Then run the server using the command below\n`$ npm start`\n\n### Authors\nEmmanuel Isabirye\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmanuelaaron%2F02_trivia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femmanuelaaron%2F02_trivia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmanuelaaron%2F02_trivia/lists"}