Skip to content

dreaminhex/DadJokes

Repository files navigation

Dad Jokes Project

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.

Steps

  1. Pull or unzip the repository, whichever you prefer
  2. Make sure you are in the Dadjokes folder
  3. If you are on Windows, simply run ./go.ps1
  4. Browse to: http://localhost:7879
  5. Laugh (hopefully).

Running the .NET API

dotnet run --project ./DadJokes.Api/DadJokes.Api.csproj

Swagger UI is available at: http://localhost:7878

Running the .NET Tests

dotnet test

Running the UI

If 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:7878

Then, run:

cd DadJokes.Ui/dadjokes
npm run dev

TL;DR; Version

I'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!

About

Simple JS/C# app that fetches random dad jokes, or allows topic search.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors