Spaces:
Sleeping
Sleeping
File size: 652 Bytes
2bf7a2b 997f2d0 2bf7a2b c9b1033 2bf7a2b c9b1033 2bf7a2b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
require('dotenv').config();
const express = require('express');
const path = require('path');
const app = express();
const PORT = parseInt(process.env.DASHBOARD_PORT || '3000', 10);
app.use(express.static(path.join(__dirname, 'public')));
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, 'public', 'index.html'));
});
app.listen(PORT, () => {
console.log('='.repeat(50));
console.log('Minecraft WebSocket API - 控制台');
console.log('='.repeat(50));
console.log(`控制台地址: http://localhost:${PORT}`);
console.log('请使用 Admin Key 或 Regular Key 登录。');
console.log('='.repeat(50));
});
|