Skip to content

Commit

Permalink
chore(sandbox): resolved errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MathurAditya724 committed Mar 23, 2024
1 parent 1f5dd5f commit 9aa3a34
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions apps/sandbox/api/Page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// import type { RateLimitInfo } from "hono-rate-limiter";
import { css } from "hono/css";
import type { FC } from "hono/jsx";
import Card from "./Card";
import Layout from "./Layout";
import Card from "./Card.js";
import Layout from "./Layout.js";

const checkOut = css`
font-family: monospace;
Expand Down
2 changes: 1 addition & 1 deletion apps/sandbox/api/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { handle } from "@hono/node-server/vercel";
import { Hono } from "hono";
import { logger } from "hono/logger";
import Page from "./Page";
import Page from "./Page.js";

const app = new Hono();

Expand Down
44 changes: 24 additions & 20 deletions apps/sandbox/api/main.ts
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() }} />
// )
// );
6 changes: 1 addition & 5 deletions apps/sandbox/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
"build": {
"executor": "nx:run-commands",
"options": {
"commands": [
"nx run sandbox:rollup",
"mv dist/apps/sandbox/index.esm.js dist/apps/sandbox/api/index.js",
"mv dist/apps/sandbox/index.esm.d.ts dist/apps/sandbox/api/index.d.ts"
],
"commands": ["echo 🔥"],
"parallel": false
}
},
Expand Down

0 comments on commit 9aa3a34

Please sign in to comment.