diff --git a/src/server.ts b/src/server.ts index b3b9b21..c80e3ea 100644 --- a/src/server.ts +++ b/src/server.ts @@ -5,13 +5,17 @@ import messagesRouter from "./routes/api/v1/messages"; import matrixRouter from "./routes/matrix"; import { errors } from "./errors"; +const ENABLE_MATRIX_LAYER = false; + export default function(app: Application) { app.use(json()); app.use("/api/v1/users", usersRouter); app.use("/api/v1/channels", channelsRouter); app.use("/api/v1/messages", messagesRouter); app.use("/", express.static("frontend/public")); - app.use("/", matrixRouter); + if (ENABLE_MATRIX_LAYER) { + app.use("/", matrixRouter); + } const errorHandler: ErrorRequestHandler = (error, req, res, next) => { console.error("error: while handling request", error);