Files
svelte-mud/docker-production.js

21 lines
629 B
JavaScript
Raw Normal View History

2025-04-21 23:22:32 +02:00
// Simple production entry point for Docker
// Runs the SvelteKit server only, WebSocket server is run separately
import { fileURLToPath } from 'url';
import { dirname } from 'path';
import { execFileSync } from 'child_process';
const __dirname = dirname(fileURLToPath(import.meta.url));
// Run the SvelteKit production server
try {
console.log('Starting SvelteKit production server');
// Execute the built SvelteKit server directly
execFileSync('node', ['build/index.js'], {
stdio: 'inherit',
cwd: __dirname
});
} catch (error) {
console.error('Error running SvelteKit server:', error);
process.exit(1);
}