diff --git a/src/api/index.ts b/src/api/index.ts index 1b5767c..449a09d 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -6,6 +6,7 @@ import Login from "./user/login"; import ClientRouter from "./client"; import * as cors from "cors"; import OAuthRoute from "./oauth"; +import config from "../config"; const ApiRouter: express.IRouter = express.Router(); ApiRouter.use("/admin", AdminRoute); @@ -22,4 +23,11 @@ ApiRouter.use("/", ClientRouter); // Legacy reasons (deprecated) ApiRouter.post("/login", Login); +ApiRouter.get("/config.json", (req, res) => { + return res.json({ + name: config.core.name, + url: config.core.url, + }); +}); + export default ApiRouter;