Skip to content

Commit b5b5484

Browse files
fix: made it possible to run on macOS (#661)
1 parent 11f8c28 commit b5b5484

6 files changed

Lines changed: 8 additions & 5 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,3 +362,4 @@ StyleCop.Cache
362362
swagger-codegen
363363
hwproj.front/static_dist/
364364
hwproj.front/dist/
365+
.DS_Store

HwProj.AuthService/HwProj.AuthService.API/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"ConnectionStrings": {
33
"DefaultConnectionForWindows": "Server=(localdb)\\mssqllocaldb;Database=AuthServiceDB;Trusted_Connection=True;TrustServerCertificate=true;",
4-
"DefaultConnectionForLinux": "Server=localhost,1433;Database=AuthServiceDB;User ID=SA;Password=password_1234;"
4+
"DefaultConnectionForLinux": "Server=localhost,1433;Database=AuthServiceDB;User ID=SA;Password=password_1234;TrustServerCertificate=True;"
55
},
66
"Logging": {
77
"LogLevel": {

HwProj.Common/HwProj.Common.Net8/ConnectionString.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ public static class ConnectionString
88
{
99
public static string GetConnectionString(IConfiguration configuration)
1010
{
11-
var option = RuntimeInformation.IsOSPlatform(OSPlatform.Linux)
11+
var option = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ||
12+
RuntimeInformation.IsOSPlatform(OSPlatform.OSX)
1213
? "DefaultConnectionForLinux"
1314
: "DefaultConnectionForWindows";
1415
return configuration.GetConnectionString(option) ?? "";

HwProj.Common/HwProj.Utils/Configuration/ConnectionString.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ public static class ConnectionString
88
{
99
public static string GetConnectionString(IConfiguration configuration)
1010
{
11-
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
11+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ||
12+
RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
1213
{
1314
return configuration.GetConnectionString("DefaultConnectionForLinux");
1415
}

HwProj.ContentService/HwProj.ContentService.API/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"ConnectionStrings": {
33
"DefaultConnectionForWindows": "Server=(localdb)\\mssqllocaldb;Database=ContentServiceDB;Trusted_Connection=True;TrustServerCertificate=true;",
4-
"DefaultConnectionForLinux": "Server=localhost,1433;Database=ContentServiceDB;User ID=SA;Password=password_1234;"
4+
"DefaultConnectionForLinux": "Server=localhost,1433;Database=ContentServiceDB;User ID=SA;Password=password_1234;TrustServerCertificate=True;"
55
},
66
"Logging": {
77
"LogLevel": {

HwProj.NotificationsService/HwProj.NotificationsService.API/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"ConnectionStrings": {
33
"DefaultConnectionForWindows": "Server=(localdb)\\mssqllocaldb;Database=NotificationsServiceDB;Trusted_Connection=True;TrustServerCertificate=true;MultipleActiveResultSets=True",
4-
"DefaultConnectionForLinux": "Server=localhost,1433;Database=NotificationsServiceDB;User ID=SA;Password=password_1234;"
4+
"DefaultConnectionForLinux": "Server=localhost,1433;Database=NotificationsServiceDB;User ID=SA;Password=password_1234;TrustServerCertificate=True;"
55
},
66
"Logging": {
77
"LogLevel": {

0 commit comments

Comments
 (0)