This is a fun little project that uses the I Can Has Dad Joke API to create random jokes, or perform searches for Dad Joke Material.
There are 2 parts to this project, the UI, and the API. You will need to run both for this to all work, but I've tried to make it very simple to do so.
- Pull or unzip the repository, whichever you prefer
- Make sure you are in the
Dadjokesfolder - If you are on Windows, simply run
./go.ps1 - Browse to: http://localhost:7879
- Laugh (hopefully).
dotnet run --project ./DadJokes.Api/DadJokes.Api.csprojSwagger UI is available at: http://localhost:7878
dotnet testIf you want to local UI to hit the local API, you'll need to add a .env file (or .env.local) under DadJokes.Ui/dadjokes and add the following entry to let Vite know to use the locally running API instead of using the production API.
VITE_API_URL=http://localhost:7878Then, run:
cd DadJokes.Ui/dadjokes
npm run devI've published the Docker image on fly.io, and the UI is live on Vercel, hitting the fly.io image. So, you can really just go to:
Dad Jokes App and have some chuckles.
If you wanna see the Swagger docs, you can check out https://dadjokes-w8kata.fly.dev/
Enjoy!