This project sets up a minimal HTTP server using C#. It listens for incoming requests, logs the user ID from the request headers, and forwards the requests to a specified service.
The best way to start the tutorial is by visiting https://tutorial.codezero.dev.
- .NET SDK 8.0 installed on your machine.
-
Clone the repository:
git clone https://github.com/c6o/tutorial-dotnet
-
Navigate to the project directory:
cd tutorial-dotnet
To start the server, run:
dotnet run
The server will listen on port 8080.
- Run
czctl compose start
to serve your local variant of service B and consume all services in the tutorial namespace. This command uses the codezero-compose.yaml to set up your Codezero environment. - Set a breakpoint in line 19 in Program.cs.
- Launch the debugger.
- The next request will be stopped by the debugger, allowing you to inspect local variables or step through the code.
Feel free to submit issues or pull requests for improvements or bug fixes.