Microservice with goals logic.
- Setup ApiKey
dotnet user-secrets set "GoalApiKey" "yourApiKey" --project ".\Goal\src\jiraF.Goal.API\"
- Start project
dotnet run --property:Configuration=Release --project .\Goal\src\jiraF.Goal.API\
Project reference https://localhost:7079/swagger/index.html
- Install postgreSQL
- Use this script
- Configure connection string
dotnet user-secrets set "DefaultConnection" "Server=localhost;Port=5432;Database=jiraf_goal;User Id=postgres;Password=yourPassword;" --project ".\Goal\src\jiraF.Goal.API\"
- Edit program file from
builder.Services.AddDbContext<AppDbContext>(options =>
{
options.UseInMemoryDatabase(TestVariables.IsWorkNow
? Guid.NewGuid().ToString()
: "TestData");
//options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection"));
});
to
builder.Services.AddDbContext<AppDbContext>(options =>
{
// options.UseInMemoryDatabase(TestVariables.IsWorkNow
// ? Guid.NewGuid().ToString()
// : "TestData");
options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection"));
});