From fa3b289a779ecfff9eee712b08e251e1d025db3c Mon Sep 17 00:00:00 2001 From: "kham.vilaythong" Date: Fri, 15 May 2026 21:34:45 +1000 Subject: [PATCH] update config file and sample graphql --- API/FamilyTreeAPI/Program.cs | 6 +++--- API/FamilyTreeAPI/appsettings.json | 4 ++-- API/FamilyTreeAPI/familytreeapp.conf | 10 ++++++++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/API/FamilyTreeAPI/Program.cs b/API/FamilyTreeAPI/Program.cs index bdc9819..8ca30e6 100644 --- a/API/FamilyTreeAPI/Program.cs +++ b/API/FamilyTreeAPI/Program.cs @@ -180,11 +180,11 @@ PM> Scaffold-DbContext "Host=postgresdb;Port=5432;database=FamilyTreeDB;user id= https://www.youtube.com/watch?v=HnXA8RI7Tvc query { - family { + persons { nodes{ id - firstname - lastname + firstName + sex email } diff --git a/API/FamilyTreeAPI/appsettings.json b/API/FamilyTreeAPI/appsettings.json index 726fc03..8c6a073 100644 --- a/API/FamilyTreeAPI/appsettings.json +++ b/API/FamilyTreeAPI/appsettings.json @@ -2,8 +2,8 @@ "AppSettings": { "Secret": "Super Secret SIGN AND VERIFY JWT TOKENS, BEARER TOKEN USE WHEN CALLING THIS API.", - "SQLConnectionString": "host=localhost;port=5432;database=FamilyTreeDB;username=postgres;password=Positive~1;", - "SQLConnectionString_vm": "host=192.168.1.240;port=5432;database=FamilyTreeDB;username=postgres;password=Positive~1;", + "SQLConnectionString_i": "host=localhost;port=5432;database=FamilyTreeDB;username=postgres;password=Positive~1;", + "SQLConnectionString": "host=192.168.1.240;port=5432;database=FamilyTreeDB;username=postgres;password=Positive~1;", "ImageFolder": "c:\\temp\\Family", "ImportFolder": "c:\\temp" diff --git a/API/FamilyTreeAPI/familytreeapp.conf b/API/FamilyTreeAPI/familytreeapp.conf index b8e1128..6b28d23 100644 --- a/API/FamilyTreeAPI/familytreeapp.conf +++ b/API/FamilyTreeAPI/familytreeapp.conf @@ -14,13 +14,19 @@ proxy_set_header X-Forwarded-Proto $scheme; } + location / { + return 301 /familytreeui/; #if same one redirect to /familytreeui/ + } + location /familytreeui { return 301 /familytreeui/; #if same one redirect to /familytreeui/ } + location /familytreeui/ { - root /var/www/familytree/; #path must exist like /var/www/familytree/familytreeui and /var/www/familytree/api folder. + #root /var/www/familytree/; #path is real must exist like /var/www/familytree/familytreeui and /var/www/familytree/api folder. + alias /var/www/familytree/ui/; #location does not to match. but angular index baseurl must same as location. #index index.html; - try_files $uri $uri/ /index.html; + try_files $uri $uri/ /familytreeui/index.html /index.html; }