this is a simple web server that will tell jokes, this also has an API
/
or/joke
- return a User Interface with the joke and the category from
jokes.json
- return a User Interface with the joke and the category from
/wocka
- return a User Interface with the joke and the category from
wocka.json
- return a User Interface with the joke and the category from
/stupidstuff
- return a User Interface with the joke and the category from
stupidstuff.json
- return a User Interface with the joke and the category from
-
/api
- returns a HTML User Interface with basic information and endpoint URLs
-
/api/jokes
- return a json with a randomly select joke from
jokes.json
- return a json with a randomly select joke from
/api/wocka
- return a json with a randomly select joke from
wocka.json
- return a json with a randomly select joke from
/api/stupidstuff
- return a json with a randomly select joke from
stupidstuff.json
- return a json with a randomly select joke from
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
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
- Download and install Python3. Make sure to 'Add to PATH' when install python3
- Download the code as a .zip file from this Github Reposotory
(this above image might not be the same)
-
Extract the downloaded
.zip
file -
open
cmd
orpowershell
in that folder -
run the command below to install requirements
python -m pip install -r requirements.txt
- run the command below to start the prorgam
python app.py