mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-14 20:15:39 +00:00
✨ load gateway url from config
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user