This commit is contained in:
2025-09-27 07:30:32 -04:00
parent a417fc5286
commit 84be09eca3
2 changed files with 41 additions and 0 deletions

23
deploy.sh Normal file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
# Production deployment script for BTCforPlebs status service
# Install dependencies
npm install
# Set production environment
export NODE_ENV=production
# Install PM2 if not already installed
if ! command -v pm2 &> /dev/null; then
npm install -g pm2
fi
# Start or restart the service with PM2
pm2 restart checklinks.js || pm2 start checklinks.js --name "btcforplebs-status"
# Save PM2 config to run on system startup
pm2 save
# Show running processes
pm2 list

View File

@@ -0,0 +1,18 @@
// Configuration for the frontend
const config = {
// API base URL - use localhost in development, services subdomain in production
apiBaseUrl: window.location.hostname === 'localhost'
? 'http://localhost:5252'
: 'https://services.btcforplebs.com',
// Debug mode - enable logging in development
debug: window.location.hostname === 'localhost'
};
// Set up logging
if (config.debug) {
console.log('Running in development mode');
console.log('API Base URL:', config.apiBaseUrl);
} else {
console.log = function() {}; // Disable console.log in production
}