import { Env, Hono } from "hono";
const app = new Hono();
app.get("/", (c) => {
return c.text("Hello Hono!");
});
export default {
async scheduled(
event: ScheduledEvent,
env: Env,
ctx: ExecutionContext
): Promise<void> {
console.log("Scheduled Event Triggered at:", new Date().toISOString());
const response = await fetch("example.worker.dev/my-endpoint");
},
async fetch(request: Request, env: Env) {
return await app.fetch(request, env);
},
};
import { Env, Hono } from "hono";
const app = new Hono();
app.get("/", (c) => {
return c.text("Hello Hono!");
});
export default {
async scheduled(
event: ScheduledEvent,
env: Env,
ctx: ExecutionContext
): Promise<void> {
console.log("Scheduled Event Triggered at:", new Date().toISOString());
const response = await fetch("example.worker.dev/my-endpoint");
},
async fetch(request: Request, env: Env) {
return await app.fetch(request, env);
},
};