feat: Single-port deployment with improved error handling and SvelteKit static build
- Frontend now uses @sveltejs/adapter-static for production builds - Backend serves both API and static files from single port (originally port 3000) - Removed all throw statements from services to avoid Elysia prototype errors - Fixed favicon serving and SvelteKit assets path handling - Added ecosystem.config.js for PM2 process management - Comprehensive deployment documentation (PM2 + HAProxy) - Updated README with single-port architecture - Created start.sh script for easy production start
This commit is contained in:
@@ -546,7 +546,7 @@ export async function getAwardProgressDetails(userId, awardId) {
|
||||
const award = definitions.find((def) => def.id === awardId);
|
||||
|
||||
if (!award) {
|
||||
throw new Error('Award not found');
|
||||
return null;
|
||||
}
|
||||
|
||||
// Calculate progress
|
||||
@@ -572,7 +572,7 @@ export async function getAwardEntityBreakdown(userId, awardId) {
|
||||
const award = definitions.find((def) => def.id === awardId);
|
||||
|
||||
if (!award) {
|
||||
throw new Error('Award not found');
|
||||
return null;
|
||||
}
|
||||
|
||||
let { rules } = award;
|
||||
|
||||
Reference in New Issue
Block a user