need help regarding this Hono cofigure with cloudflare worker #2287
Unanswered
abhishek-shivale
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
anyone know why this is not working i tried on replite without hono its working any solution import { CheerioAPI, SelectorType, load } from "cheerio";
import { Hono } from "hono";
import { ACCEPT_ENCODING_HEADER, ACCEPT_HEADER, SRC_HOME_URL, USER_AGENT_HEADER } from "./utils/constants";
const app = new Hono();
app.get("/", async (c, next) => {
try {
const mainPage = await fetch(SRC_HOME_URL as string, {
headers: {
"User-Agent": USER_AGENT_HEADER,
"Accept-Encoding": ACCEPT_ENCODING_HEADER,
Accept: ACCEPT_HEADER,
},
});
}catch(err:any){
c.json(err)
}})
export default app
Beta Was this translation helpful? Give feedback.
All reactions