Fix admin route access and backend configuration

- Added /admin redirect to login page in nginx config
- Fixed backend server.js route ordering for proper admin handling
- Updated authentication middleware and routes
- Added user management routes
- Configured PostgreSQL integration
- Updated environment configuration
This commit is contained in:
Local Server
2025-12-13 22:34:11 -06:00
parent 8bb6430a70
commit 703ab57984
253 changed files with 29870 additions and 157 deletions

View File

@@ -0,0 +1,29 @@
# Sync uploaded images between live site and localhost
# Run this script to sync images uploaded on the live site to your development environment
$liveUploads = "C:\inetpub\wwwroot\skyartshop\wwwroot\uploads\images"
$devUploads = "E:\Documents\Website Projects\Sky_Art_Shop\wwwroot\uploads\images"
Write-Host "🔄 Syncing uploads from live site to localhost..." -ForegroundColor Cyan
# Copy new files from live to dev
Get-ChildItem -Path $liveUploads -File | ForEach-Object {
$devFile = Join-Path $devUploads $_.Name
if (-not (Test-Path $devFile) -or $_.LastWriteTime -gt (Get-Item $devFile).LastWriteTime) {
Copy-Item $_.FullName $devFile -Force
Write-Host " ✅ Copied: $($_.Name)" -ForegroundColor Green
}
}
# Copy new files from dev to live (if you upload locally)
Get-ChildItem -Path $devUploads -File | ForEach-Object {
$liveFile = Join-Path $liveUploads $_.Name
if (-not (Test-Path $liveFile) -or $_.LastWriteTime -gt (Get-Item $liveFile).LastWriteTime) {
Copy-Item $_.FullName $liveFile -Force
Write-Host " ✅ Copied to live: $($_.Name)" -ForegroundColor Yellow
}
}
Write-Host "`n✨ Sync complete!" -ForegroundColor Green
Write-Host "📊 Total images in dev: $((Get-ChildItem $devUploads).Count)" -ForegroundColor Cyan
Write-Host "📊 Total images in live: $((Get-ChildItem $liveUploads).Count)" -ForegroundColor Cyan