Added server metadata

This commit is contained in:
Gilles Lazures 2026-02-11 00:32:44 +01:00
parent 96d40456d5
commit a40a6d6ad8
3 changed files with 22 additions and 1 deletions

View File

@ -1,2 +1,4 @@
WEB_PORT=3000
IS_PROD=FALSE
INSTANCE_NAME="Azures04"
INSTANCE_LOGO="https://chibieditor.fr/assets/img/avatars/azures.png"

9
routes/index.js Normal file
View File

@ -0,0 +1,9 @@
const express = require("express")
const router = express.Router()
const metaService = require("../services/metaService")
router.get("/", (req, res) => {
return res.status(200).json(metaService.getServerMetadata())
})
module.exports = router

10
services/metaService.js Normal file
View File

@ -0,0 +1,10 @@
function getServerMetadata() {
return {
name: process.env["INSTANCE_NAME"],
logo: process.env["INSTANCE_LOGO"]
}
}
module.exports = {
getServerMetadata
}