mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-22 20:10:40 +03:00
17 lines
No EOL
514 B
JavaScript
17 lines
No EOL
514 B
JavaScript
const { UserModel, ThreadModel, MessageModel } = require("../models")
|
|
const { Router } = require("express");
|
|
const app = Router();
|
|
|
|
app.get("/", async (req, res) => {
|
|
|
|
const
|
|
mem = process.memoryUsage().heapUsed / Math.pow(2, 20),
|
|
users = await UserModel.count({ deleted: false }),
|
|
threads = await ThreadModel.count({ deleted: false }),
|
|
messages = await MessageModel.count({ deleted: false });
|
|
|
|
res.reply("index", { mem, users, threads, messages })
|
|
|
|
})
|
|
|
|
module.exports = app; |