Technology Stack:
- .NET
This project reimplements the Quarkus-based hello world service from workshop-quarkus-hello_quarkus using ASP.NET Core minimal APIs. It exposes a single endpoint that returns a localized greeting with an ISO-8601 timestamp appended, mirroring the original behaviour.
- .NET SDK 8.0 or newer
- Restore dependencies
dotnet restore- Run the tests
dotnet test- Start the service. The server listens on port
8080by default. Override with thePORTenvironment variable if needed.
dotnet run- HTTP endpoint
GET /– Responds with a greeting string such ashello world @ 2024-06-01T12:34:56.000Z.GET /eggs– 🥚 See below.
- Configuration Environment variables provide the same configurability as the Quarkus and Node.js versions:
TRANSLATION_DEFAULT_LANGUAGE(default:EN) – Two-letter code used to choose the greeting.TRANSLATION_FILE(default:translations.json) – File located in theresources/directory that contains the greeting map.PORT(default:8080) – Port for the HTTP server.
All translations are stored in resources/translations.json, copied verbatim from the Quarkus project.
One egg is hidden in this service. Start the service, then ask it for the riddle at /eggs.
From a terminal in your workspace:
curl http://localhost:8080/eggsIn OpenShift Dev Spaces, open the hello-by-lang endpoint from the Endpoints view and add /eggs to the end of the URL.
- 🥚 Find the easter egg – "The translation file holds 85 greetings, but the service knows a few it never wrote down. Pirates can read them."
You will know you found it when the service hands you a trophy. 🏆
House rules: reading EasterEggs.cs is cheating (and it is encoded anyway). The response headers, however, are fair game. 🐣