H
Hono4w ago
wyilio

Adding hono to existing node express project

Does anyone have experience using Hono alongside their Node express server? We're trying to use Express middleware to pass requests to our Hono router I keep getting a 404 not found and can't figure out how to pass the Express request properly to Hono
const router = express.Router<$Request, $Response>();
router.use('/hono', async (req, res, next) => {
honoApp
.request(req, {
raw: res,
passThrough: next,
})
.then(honoResponse => {
if (!honoResponse) {
console.log(honoResponse);
return next();
} // Pass through if not handled by Hono
})
.catch(next);
});
const router = express.Router<$Request, $Response>();
router.use('/hono', async (req, res, next) => {
honoApp
.request(req, {
raw: res,
passThrough: next,
})
.then(honoResponse => {
if (!honoResponse) {
console.log(honoResponse);
return next();
} // Pass through if not handled by Hono
})
.catch(next);
});
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server