8fee2faf1e
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
15 lines
420 B
TypeScript
15 lines
420 B
TypeScript
import http from 'http';
|
|
import { GameLoop } from './game/GameLoop.js';
|
|
import { SocketServer } from './network/SocketServer.js';
|
|
|
|
const PORT = process.env.PORT ? parseInt(process.env.PORT) : 3001;
|
|
|
|
const gameLoop = new GameLoop();
|
|
const httpServer = http.createServer();
|
|
new SocketServer(httpServer, gameLoop);
|
|
|
|
httpServer.listen(PORT, () => {
|
|
console.log(`Server listening on port ${PORT}`);
|
|
gameLoop.start();
|
|
});
|