[TS] Renamed file extensions to typescript
This commit is contained in:
parent
4d5b347767
commit
4a6f20fa7b
31 changed files with 12 additions and 0 deletions
|
@ -1,38 +0,0 @@
|
|||
// Imports
|
||||
import express from "express";
|
||||
|
||||
// Routes
|
||||
import vitals from "../routes/vitals-route.js";
|
||||
import authRoute from "../routes/auth-route.js";
|
||||
import systemRoute from "../routes/system-route.js";
|
||||
import serverRoute from "../routes/server-route.js";
|
||||
import filesRoute from "../routes/files-route.js";
|
||||
import reactRoute from "../routes/react-route.js";
|
||||
import s3Route from "../routes/s3-route.js";
|
||||
import {
|
||||
logErrors,
|
||||
clientErrorHandler,
|
||||
errorHandler,
|
||||
} from "../routes/error-route.js";
|
||||
|
||||
export default function buildRoutes(pg, skio) {
|
||||
const router = express.Router();
|
||||
// Special Routes
|
||||
router.use(vitals);
|
||||
router.all("/", (req, res) => res.redirect("/mcl"));
|
||||
|
||||
// Middlewares
|
||||
|
||||
// Routes
|
||||
router.use("/api/auth", authRoute);
|
||||
router.use("/api/system", systemRoute);
|
||||
router.use("/api/server", serverRoute);
|
||||
router.use("/api/files", filesRoute);
|
||||
router.use("/api/s3", s3Route);
|
||||
router.use(["/mcl", "/mcl/*"], reactRoute); // Static Build Route
|
||||
/*router.use(logErrors);
|
||||
router.use(clientErrorHandler);
|
||||
router.use(errorHandler);*/
|
||||
|
||||
return router;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue