mirror of
https://github.com/DeNNiiInc/Web-Page-Performance-Test.git
synced 2026-04-17 20:05:58 +00:00
🚀 Setup automated deployment system with comprehensive credential protection
- Added Express server with Git info API endpoint - Created automated deployment scripts (systemd-based, not PM2) - Implemented 5-minute auto-sync with GitHub - Enhanced .gitignore with 200+ credential protection patterns - Added Git version badge to UI footer - Created comprehensive deployment documentation - Added TurnKey Nginx fix for default control panel issue - Included security verification tools All credentials protected and verified safe for deployment.
This commit is contained in:
33
script.js
Normal file
33
script.js
Normal file
@@ -0,0 +1,33 @@
|
||||
// ============================================================================
|
||||
// Git Version Badge - Auto-update from server
|
||||
// ============================================================================
|
||||
|
||||
async function updateVersionBadge() {
|
||||
try {
|
||||
const response = await fetch('/api/git-info');
|
||||
const data = await response.json();
|
||||
|
||||
const commitIdEl = document.getElementById('commit-id');
|
||||
const commitAgeEl = document.getElementById('commit-age');
|
||||
|
||||
if (data.error) {
|
||||
commitIdEl.textContent = 'N/A';
|
||||
commitAgeEl.textContent = 'Local Dev';
|
||||
commitIdEl.style.color = 'var(--color-text-muted)';
|
||||
} else {
|
||||
commitIdEl.textContent = data.commitId;
|
||||
commitAgeEl.textContent = data.commitAge;
|
||||
commitIdEl.style.color = 'var(--color-accent-success)';
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch git info:', error);
|
||||
document.getElementById('commit-id').textContent = 'N/A';
|
||||
document.getElementById('commit-age').textContent = 'Error';
|
||||
}
|
||||
}
|
||||
|
||||
// Update version badge on page load
|
||||
document.addEventListener('DOMContentLoaded', updateVersionBadge);
|
||||
|
||||
// Optional: Auto-refresh every 5 minutes to show latest version
|
||||
setInterval(updateVersionBadge, 5 * 60 * 1000);
|
||||
Reference in New Issue
Block a user