getditto / samples

Sample Codes using Ditto
14 stars 7 forks source link

Move c-sharp-server to it's own repository #148

Closed okdistribute closed 6 months ago

okdistribute commented 6 months ago
okdistribute commented 6 months ago

Added you for visibility @busec0, if you have any extra time to take a look. No urgency on this, it's just a cleanup task.

busec0 commented 6 months ago

Moved to https://github.com/getditto/template-c-sharp-server/tree/main and added a few changes:

Auth Server

  1. Made it a proper server application (asp.net) instead of a console app.
  2. Cleanup and and organized the code a bit - moving ditto setup logic to a dedicated class - DittoInitializer.cs
  3. Added placeholders for VerifyingKey and SigningKey instead of existing values. These should be filled by the user
  4. Moved configuration variables in appSettings.json. Screenshot 2024-05-30 at 16 03 23
  5. Added a TasksController - meaning a Tasks API. You can interact with the Tasks collection from the server either via Postman or the Swagger page that automatically loads when you start the server from an IDE. Screenshot 2024-05-30 at 15 58 37

Console App - C

  1. Changed the folder and project name to DotnetConsoleClient
  2. A "refactor" of the Program.cs file - added dedicated methods for each action (compared to the 100+ lines Main before)
  3. Fixed some logic errors, handled possible crashes (e.g. passing an invalid ID)

JS Client

No changes, just made sure everything is working as before.

okdistribute commented 6 months ago

Amazing! Thanks