Skip to content

Commit

Permalink
chore: resolved errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MathurAditya724 committed Mar 23, 2024
1 parent 8112a96 commit 00162d7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
1 change: 1 addition & 0 deletions apps/sandbox/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NODEJS_HELPERS=0
4 changes: 0 additions & 4 deletions apps/sandbox/api/index.ts

This file was deleted.

16 changes: 16 additions & 0 deletions apps/sandbox/api/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { handle } from "@hono/node-server/vercel";
import { Hono } from "hono";
import { logger } from "hono/logger";
import Page from "./Page";

const app = new Hono();

app.use(logger());

app.get("/", (c) => {
return c.html(
<Page info={{ limit: 5, used: 1, remaining: 4, resetTime: new Date() }} />,
);
});

export default handle(app);
8 changes: 2 additions & 6 deletions apps/sandbox/api/main.tsx → apps/sandbox/api/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Hono } from "hono";
// import { type RateLimitInfo, rateLimiter } from "hono-rate-limiter";
import { logger } from "hono/logger";
import Page from "./Page";
// import Page from "./Page";

// Init the app
export const app = new Hono();
Expand All @@ -20,8 +20,4 @@ app.use(
);

// Routes
app.get("/", (c) =>
c.html(
<Page info={{ limit: 5, used: 1, remaining: 4, resetTime: new Date() }} />,
),
);
app.all("*", (c) => c.text("hello"));

0 comments on commit 00162d7

Please sign in to comment.