Spaces:
Paused
Paused
File size: 478 Bytes
b268bfa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import { Hono } from 'hono';
import { logger } from 'hono/logger';
import { serveStatic } from 'hono/deno';
const app = new Hono();
app.use(logger());
app.get('/', (c) => c.text('Hello'));
// app.get('*', serveStatic({ path: './gray.svg' }));
app.get('*', (c) => {
c.header('Content-Type', 'image/svg+xml');
return c.body(`<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><rect width="32" height="32" fill="#c3c3c3" /></svg>`);
});
Deno.serve(app.fetch);
|