import express from "express";
import getAll from "./routers/getAll.js";
import getUser from "./routers/getUser.js";
import getTopTen from "./routers/getTopTen.js";
import reset from "./routers/reset.js";

const router = express.Router();

const app = express();
app.use(express.json());

app.use("/api", getAll);
app.use("/api", getTopTen);
app.use("/api", getUser);
app.use("/api", reset);

app.use("/api", router);
const PORT = process.env.PORT || 5000;
app.listen(PORT, () => console.log(`Server started on port ${PORT}`));
