summary refs log tree commit diff
path: root/src/routes
diff options
context:
space:
mode:
authorDiego Magdaleno <diegomagdaleno@protonmail.com>2021-05-15 16:57:31 -0500
committerDiego Magdaleno <diegomagdaleno@protonmail.com>2021-05-15 16:57:31 -0500
commitfc2ae1a41e42a7fcf2291a2226046e1d859d6196 (patch)
tree1cc64790a1f98fcdf989b4245760c7b240d80947 /src/routes
parentConfig: Be able to configure the target_url (diff)
downloadserver-fc2ae1a41e42a7fcf2291a2226046e1d859d6196.tar.xz
Config: Redo config to be more straight to the point
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/gateway.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/routes/gateway.ts b/src/routes/gateway.ts

index 9d34c999..4c7ff450 100644 --- a/src/routes/gateway.ts +++ b/src/routes/gateway.ts
@@ -3,10 +3,9 @@ import Config from "../util/Config" const router = Router(); -const url = Config.get().server.root_url; - router.get("/", (req, res) => { - res.send({ url: `ws://${url}:3002` }); + const { endpoint } = Config.getAll().gateway(); + res.send({ url: endpoint || "ws://localhost:3002" }); }); export default router;