mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-12-22 23:59:08 +03:00
21 lines
No EOL
510 B
JavaScript
21 lines
No EOL
510 B
JavaScript
const { User } = require("../classes");
|
|
const { get } = require("quick.db")
|
|
|
|
const { Router } = require("express");
|
|
const app = Router();
|
|
|
|
app.get("/", (req, res) => {
|
|
|
|
const
|
|
mem = process.memoryUsage().heapUsed / Math.pow(2, 20),
|
|
users = get("users").length,
|
|
threads = get("threads").length,
|
|
messages = get("messages").length,
|
|
user = new User().getId(req.session.userid);
|
|
|
|
res.render("index", { mem, user, users, threads, messages })
|
|
|
|
})
|
|
|
|
|
|
module.exports = app; |