
import { createRequire } from 'module'; 
const require = createRequire(import.meta.url);
        

// src/server.ts
var Server = class {
  constructor(party) {
    this.party = party;
  }
  lastMessage = null;
  onConnect(conn) {
    if (this.lastMessage) {
      conn.send(this.lastMessage);
    }
  }
  onMessage(message, sender) {
    this.lastMessage = message;
    this.party.broadcast(message, [sender.id]);
  }
};
export {
  Server as default
};
//# sourceMappingURL=server.esm.js.map
