Clone the repo to your machine:
$ git clone https://github.com/BrandonShega/DadJokes.git
Requirements
- .NET Core
Running Server
$ cd DadJokesAPI/DadJokesAPI && dotnet run
Server should be running at https://localhost:5001
Requirements
- Node Package Manager
Dependency Installation
$ npm install
Running Server
$ cd dadjokesclient && npm run serve
Server should be running at http://localhost:8080
The API provides two endpoints
URL: /api/jokes
Method: GET
Response:
{
"id": "xHQucUvszd",
"joke": "To the guy who invented zero... thanks for nothing."
}
URL: /api/jokes/:query
Method: GET
Response:
{
"short": [{
"id": "JBs4T79Edpb",
"joke": "Breaking news! Energizer <Bunny> arrested – charged with battery."
}],
"medium": [{
"id": "PfaMusPucFd",
"joke": "What do you do when your <bunny> gets wet? You get your hare dryer."
}, {
"id": "a29pbp4haFd",
"joke": "Where do rabbits go after they get married? On a <bunny>-moon."
}],
"long": []
}