/
opt
/
canhelp
/
node_modules
/
hono
/
dist
/
adapter
/
bun
/
/opt/canhelp/node_modules/hono/dist/adapter/bun
mkdir
upload
Name
Size
Mode
Actions
conninfo.js
655
0644
edit
dl
rm
index.js
447
0644
edit
dl
rm
serve-static.js
747
0644
edit
dl
rm
server.js
124
0644
edit
dl
rm
ssg.js
379
0644
edit
dl
rm
websocket.js
1847
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/hono/dist/adapter/bun/serve-static.js
(747B)
// src/adapter/bun/serve-static.ts import { stat } from "node:fs/promises"; import { join } from "node:path"; import { serveStatic as baseServeStatic } from "../../middleware/serve-static/index.js"; var serveStatic = (options) => { return async function serveStatic2(c, next) { const getContent = async (path) => { const file = Bun.file(path); return await file.exists() ? file : null; }; const isDir = async (path) => { let isDir2; try { const stats = await stat(path); isDir2 = stats.isDirectory(); } catch { } return isDir2; }; return baseServeStatic({ ...options, getContent, join, isDir })(c, next); }; }; export { serveStatic };
Save
cmd:
run