🦠 Added ignored folder back to git tracking

Signed-off-by: Rishi Ghan <rishi.ghan@gmail.com>
This commit is contained in:
2021-04-15 15:15:23 -07:00
parent 2ccebf13b8
commit 22a5cba98d
11 changed files with 200 additions and 0 deletions

View File

@@ -0,0 +1 @@
## Read me for routes

View File

@@ -0,0 +1,3 @@
import extra from "./routes/importComics.routes";
export default { extra };

12
src/server/route/path.ts Normal file
View File

@@ -0,0 +1,12 @@
import { Ipath, IPathRoute } from "../interfaces/path.interface";
function path(url: string): IPathRoute {
const allRoutes: Ipath = {
"/extra": {
methods: ["POST", "GET", "PUT"],
},
};
return allRoutes[url];
}
export default path;

View File

@@ -0,0 +1,5 @@
import express, { Router } from "express";
const router: Router = express.Router();
export default router;

View File

@@ -0,0 +1,16 @@
import router from "../router";
import { walkFolder, extractArchive } from "../../utils/fs.utils";
import { Request, Response } from "express";
router.route("/getComicCovers").get((req: Request, res: Response) => {
res.json({
jagan: "trupti",
});
});
router.route("/walkFolder").get(async (req: Request, res: Response) => {
const results = await walkFolder(req.params.basePathToWalk);
res.json(results);
});
export default router;