-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f5dd5f
commit 9aa3a34
Showing
4 changed files
with
28 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
import { Hono } from "hono"; | ||
// import { type RateLimitInfo, rateLimiter } from "hono-rate-limiter"; | ||
import { logger } from "hono/logger"; | ||
// import Page from "./Page"; | ||
// import { Hono } from "hono"; | ||
// // import { type RateLimitInfo, rateLimiter } from "hono-rate-limiter"; | ||
// import { logger } from "hono/logger"; | ||
// // import Page from "./Page"; | ||
|
||
// Init the app | ||
export const app = new Hono(); | ||
// // Init the app | ||
// export const app = new Hono(); | ||
|
||
// Adding the rate limitter | ||
app.use( | ||
logger(), | ||
// rateLimiter({ | ||
// windowMs: 10_000, | ||
// limit: 10, | ||
// // store: new RedisStore({ | ||
// // sendCommand: (...args: string[]) => kv.eval(...args), | ||
// // }), | ||
// handler: (_, next) => next(), | ||
// }), | ||
); | ||
// // Adding the rate limitter | ||
// app.use( | ||
// logger() | ||
// // rateLimiter({ | ||
// // windowMs: 10_000, | ||
// // limit: 10, | ||
// // // store: new RedisStore({ | ||
// // // sendCommand: (...args: string[]) => kv.eval(...args), | ||
// // // }), | ||
// // handler: (_, next) => next(), | ||
// // }), | ||
// ); | ||
|
||
// Routes | ||
app.all("*", (c) => c.text("hello")); | ||
// // Routes | ||
// app.get("/", (c) => | ||
// c.html( | ||
// <Page info={{ limit: 5, used: 1, remaining: 4, resetTime: new Date() }} /> | ||
// ) | ||
// ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters