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:
parent
68f7b66fb1
commit
89e0e2ebdc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user