Enhance configuration management: Updated README.md with Windows sync instructions, refactored backend configuration files to improve loading logic, and ensured consistent function definitions. Improved error handling in bootstrap.php for better user feedback during application startup.
This commit is contained in:
23
scripts/sync-backend-to-public.ps1
Normal file
23
scripts/sync-backend-to-public.ps1
Normal file
@@ -0,0 +1,23 @@
|
||||
# Kopiert Backend-Includes und -Config nach public/ (für Produktions-Deploy)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
|
||||
$includesSrc = Join-Path $root 'backend\includes'
|
||||
$configSrc = Join-Path $root 'backend\config'
|
||||
$includesDst = Join-Path $root 'public\includes'
|
||||
$configDst = Join-Path $root 'public\config'
|
||||
|
||||
if (-not (Test-Path $includesSrc)) {
|
||||
throw "Backend-Includes nicht gefunden: $includesSrc"
|
||||
}
|
||||
if (-not (Test-Path $configSrc)) {
|
||||
throw "Backend-Config nicht gefunden: $configSrc"
|
||||
}
|
||||
|
||||
New-Item -ItemType Directory -Force -Path $includesDst | Out-Null
|
||||
New-Item -ItemType Directory -Force -Path $configDst | Out-Null
|
||||
|
||||
Copy-Item -Path (Join-Path $includesSrc '*') -Destination $includesDst -Recurse -Force
|
||||
Copy-Item -Path (Join-Path $configSrc '*') -Destination $configDst -Recurse -Force
|
||||
|
||||
Write-Host "OK: backend -> public/includes und public/config synchronisiert."
|
||||
Reference in New Issue
Block a user