@@ -177,6 +177,20 @@ $webAppUrl = $appUrl
177177$adminPanelUrl = Get-SubdomainUrl - baseUrl $appUrl - subdomain " admin"
178178$apiUrl = Get-SubdomainUrl - baseUrl $appUrl - subdomain " api"
179179
180+ # Generate support email from the application URL
181+ function Get-SupportEmail {
182+ param ([string ]$url )
183+
184+ if ($url -match ' ^(https?://)([^/]+)(.*)$' ) {
185+ $domain = $matches [2 ]
186+ return " support@$domain "
187+ }
188+
189+ return " support@example.com"
190+ }
191+
192+ $supportEmail = Get-SupportEmail - url $appUrl
193+
180194# Get admin user details
181195$adminMobile = Get-UserInput - prompt " Enter admin user mobile number" - default $defaultSettings.Identity.AdminUser.Mobile - validationType ' mobile'
182196$adminEmail = Get-UserInput - prompt " Enter admin user email" - default $defaultSettings.Identity.AdminUser.Email - validationType ' email'
@@ -211,6 +225,7 @@ try {
211225 # Only replace the application name in specific places
212226 $content = $content -replace ' "Application":\s*{\s*"Default":\s*{\s*"Name":\s*"[^"]*"' , " `" Application`" : { `" Default`" : { `" Name`" : `" $appName `" "
213227 $content = $content -replace ' "Url":\s*"[^"]*"' , " `" Url`" : `" $currentUrl `" "
228+ $content = $content -replace ' "SupportEmail":\s*"[^"]*"' , " `" SupportEmail`" : `" $supportEmail `" "
214229
215230 # Update JWT Issuer for API project
216231 if ($_.FullName -like " *Api*" ) {
@@ -347,5 +362,7 @@ Write-Host "API URL: " -NoNewline
347362Write-Host $apiUrl - ForegroundColor Yellow
348363Write-Host " Admin Email: " - NoNewline
349364Write-Host $adminEmail - ForegroundColor Yellow
365+ Write-Host " Support Email: " - NoNewline
366+ Write-Host $supportEmail - ForegroundColor Yellow
350367
351368Write-Host " `n You can now build and run your application." - ForegroundColor Green
0 commit comments