🧩 Comlink funkiness

This commit is contained in:
2021-04-26 13:46:05 -07:00
parent 857f0ffe4f
commit 0701ef19f8
8 changed files with 40 additions and 44 deletions

View File

@@ -15,6 +15,7 @@ const port: number = Number(process.env.PORT) || 8050; // set our port
// Send index.html on root request
app.use(express.static("dist"));
app.use(express.static("src/client/workers"));
app.get("/", (req: Request, res: Response) => {
console.log("sending index.html");
res.sendFile("/dist/index.html");

View File

@@ -14,7 +14,7 @@ router.route("/getComicCovers").post(async (req: Request, res: Response) => {
typeof req.body.extractionOptions === "object"
? req.body.extractionOptions
: {};
const foo = await extractArchive(req.body.extractionOptions);
const extractedData = await extractArchive(req.body.extractionOptions);
// const foo = await extractMetadataFromImage(
// "./comics/covers/Ghosts and Ruins-001.jpg",
// );
@@ -22,8 +22,7 @@ router.route("/getComicCovers").post(async (req: Request, res: Response) => {
// const foo = await unzip("asd");
// const foo = explodePath("Chapter Three/HELLBOY - The Chained Coffin - 069.jpg");
res.json({
jagan: "trupti",
foo,
extractedData,
});
});