1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-11 13:14:06 +01:00

load gateway url from config

This commit is contained in:
Flam3rboy 2021-05-18 22:05:25 +02:00
parent 68f7b66fb1
commit 89e0e2ebdc

View File

@ -1,9 +1,12 @@
import { Router } from "express";
import Config from "../util/Config";
const router = Router();
router.get("/", (req, res) => {
res.send({ url: "ws://localhost:3002" });
const endpoint = Config.getAll()?.gateway?.endpoint;
res.send({ url: endpoint || "ws://localhost:3002" });
});
export default router;