Commit 982b1eb9 authored by nagayama15's avatar nagayama15

Change wasm directory

parent 4e9105a6
......@@ -12,9 +12,7 @@ const server = app.listen(port, () => {
console.log(`server listening at port ${port}`);
});
app.get(
"/wasm/add.wasm",
async (req: express.Request, res: express.Response) => {
app.get("/add.wasm", async (req: express.Request, res: express.Response) => {
const path = `${__dirname}/../wasm/add.wasm`;
const watermark = req.query.v || "";
......@@ -24,7 +22,6 @@ app.get(
const process = childProcess.spawn(watermarker, [path, watermark, "-"]);
process.stdout.pipe(res);
res.on("finish", () => console.timeEnd("kyut"));
}
);
});
app.use(express.static(`${__dirname}/../static`));
......@@ -18,7 +18,7 @@
(async () => {
// Import wasm module
const wasm = await WebAssembly.instantiateStreaming(
fetch("wasm/add.wasm")
fetch("add.wasm")
);
const { add2, add3 } = wasm.instance.exports;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment