Spaces:
Sleeping
Sleeping
| 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)); | |
| }); | |