transfer.blitzw.in/tracker.js
Kumi 269f19401e
style(tracker): standardize string quotations
Switched from single to double quotes throughout tracker.js
for consistent string formatting. This improves code
readability and maintains uniformity across the project.
2024-06-14 17:15:11 +02:00

25 lines
514 B
JavaScript

import { Server } from "bittorrent-tracker";
const PORT = process.env.TRACKER_PORT || 8106;
const HOST = process.env.TRACKER_HOST || "localhost";
const server = new Server({
udp: true,
http: true,
ws: true,
stats: true,
});
server.on("error", (err) => {
console.error(`Error: ${err.message}`);
});
server.on("warning", (err) => {
console.warn(`Warning: ${err.message}`);
});
server.on("listening", () => {
console.log(`Tracker is listening on http://${HOST}:${PORT}`);
});
server.listen(PORT);