feat(admincli): add command for creating a user

This commit is contained in:
Stevan Freeborn
2026-02-03 04:38:40 -06:00
parent 0ce97cdec8
commit fcc1356d69
11 changed files with 114 additions and 14 deletions
+15 -11
View File
@@ -1,11 +1,15 @@
// TODO: We need a way to add
// a user to the system with
// a properly hashed password
// so need something like this:
//
// 1. Ask for username
// 2. Ask for user password
// 3. Hash user password
// 4. Save user to database
Console.WriteLine("Hello, World!");
await Host.CreateDefaultBuilder(args)
.ConfigureAppConfiguration(
static c => c.SetBasePath(AppContext.BaseDirectory)
.AddJsonFile("appsettings.json")
.AddEnvironmentVariables()
)
.ConfigureLogging(static c => c.ClearProviders())
.ConfigureServices(static (_, services) =>
{
services.AddSingleton(AnsiConsole.Console);
services.AddInfrastructure();
services.AddHostedService<App>();
})
.Build()
.StartAsync();