node-server
node-server copied to clipboard
feat:add sendFile func
- https://github.com/honojs/node-server/issues/205
- https://github.com/orgs/honojs/discussions/3755
exp:
// exp1
import { Hono } from 'hono'
import { sendFile } from './send-file'
let tf = true
const app = new Hono()
.get('/my-path', (c, next) => {
tf = !tf
const filePath: string = tf
? 'C:/exp/bar.gif'
: 'C:/exp/foo.jpg'
return sendFile(c, filePath)
})
This project uses bun as the package manager, but uses node to run tests, so is it normal that I cannot run jest in the Windows environment?