Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

hirusha-adi/Jokes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TheJokesAPI

this is a simple web server that will tell jokes, this also has an API

Showcase (images)

Screenshot_20220317_151434

Screenshot_20220317_151458

Screenshot_20220317_151549

Screenshot_20220317_151605

Endpoints

UI

  • / or /joke
    • return a User Interface with the joke and the category from jokes.json
  • /wocka
    • return a User Interface with the joke and the category from wocka.json
  • /stupidstuff
    • return a User Interface with the joke and the category from stupidstuff.json

API

  • Information -

    • /api - returns a HTML User Interface with basic information and endpoint URLs
  • Endpoints -

    • /api/jokes
      • return a json with a randomly select joke from jokes.json
    • /api/wocka
      • return a json with a randomly select joke from wocka.json
    • /api/stupidstuff
      • return a json with a randomly select joke from stupidstuff.json

Installation

Arch Linux

run the commands below, line by line

sudo pacman -Syy wget --noconfirm
wget "https://raw.githubusercontent.com/hirusha-adi/Jokes/setup/arch.sh"
chmod +x ./arch.sh
./arch.sh

Ubuntu/Debain

run the commands below, line by line

sudo apt install wget -y
wget "https://raw.githubusercontent.com/hirusha-adi/Jokes/setup/ubuntu.sh"
chmod +x ./ubuntu.sh
./ubuntu.sh

Windows

  1. Download and install Python3. Make sure to 'Add to PATH' when install python3

imagew1

  1. Download the code as a .zip file from this Github Reposotory

imagew2

(this above image might not be the same)

  1. Extract the downloaded .zip file

  2. open cmd or powershell in that folder

  3. run the command below to install requirements

python -m pip install -r requirements.txt
  1. run the command below to start the prorgam
python app.py

"it's just a joke" ~ nobody. lol