...
Now add a line of code that will enable you to use the executable which normally runs the Kestrel webserver with your site to run Lynicon service and setup commands:
Code Block | ||
---|---|---|
| ||
if (Lynicon.Commands.CommandRunner.InterceptAndRunCommands(host.Services, args))
return; |
Add the highlighted line of code above into your Program.cs file in the root of your project.
...
Run "dotnet run lynicon initialize-database". After building your project again, this will connect to the database with the connection string provided and set up the core tables Lynicon requires.
Run the
...
Initialize-Admin Command
Run "dotnet run lynicon initialize-admin <admin password>" (use your own password in place of m1pAssw0rd!). This sets up the admin user with the supplied password. Lynicon does not create a default admin user to avoid the scenario where this user is left with their default password causing a major security risk.
...