Skip to content

Commit

Permalink
misc(example): clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
mildronize committed May 16, 2024
1 parent cb603ba commit 0e0ee34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 0 additions & 2 deletions examples/with-bun/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { Hono } from 'hono';
import { logger } from 'hono/logger';
import { HonoAzureMiddleware, register } from 'nammatham';

// DO NOT SET `basePath` for Hono App, Azure Functions will handle it
const app = new Hono();
app.use(logger());

const func = new HonoAzureMiddleware();

Expand Down
15 changes: 6 additions & 9 deletions examples/with-node/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { Hono } from 'hono';
import { serve } from '@hono/node-server';
import { HonoAzureMiddleware, register } from 'nammatham';
import { logger } from 'hono/logger';
import { serve } from '@hono/node-server';

// DO NOT SET `basePath` for Hono App, Azure Functions will handle it
const app = new Hono();
app.use(logger());

const func = new HonoAzureMiddleware();

Expand All @@ -22,11 +20,10 @@ app.all(...func.get('/SimpleHttpTrigger'), c => {
});
});

export default serve(
register({
fetch: app.fetch,
func,
})
);
const nammathamApp = register({
fetch: app.fetch,
func,
});
export default serve(nammathamApp);


0 comments on commit 0e0ee34

Please sign in to comment.