Files
vue-pult/server/api/game-info.js
sasha 3e90269b0b Initial commit: Vue.js тир управления система
- Клиентская часть Vue 3 + Vite
- Серверная часть Node.js + WebSocket
- Система авторизации и смен
- Управление игровыми портами
- Поддержка тем (светлая/темная)
- Адаптивный дизайн

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 12:24:22 +03:00

18 lines
637 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const game = require('../game.js');
exports.go = (req, res, postData, urlParsed) => {
try {
// Получаем информацию об играх из конфига
const gameInfo = game.cfg.info;
console.log('[API] Запрошена информация об играх');
res.end(JSON.stringify(gameInfo));
} catch (error) {
console.error('[API] Ошибка получения информации об играх:', error);
res.end(JSON.stringify({
error: 'Failed to load game info',
message: String(error)
}));
}
};