summary refs log tree commit diff
path: root/api/src/routes/gateway.ts
blob: d42083416429c769823f387f1622920eb719c03b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import { Config } from "@fosscord/util";
import { Router, Response, Request } from "express";
import { route } from "@fosscord/api";

const router = Router();

router.get("/", route({}), (req: Request, res: Response) => {
	const { endpoint } = Config.get().gateway;
	res.json({ url: endpoint || process.env.GATEWAY || "ws://localhost:3002" });
});

export default router;