Add middleware.

This commit is contained in:
Dave Smith-Hayes 2024-03-02 12:57:48 -05:00
parent c39cb5ed34
commit 5dbcd597cd

View File

@ -0,0 +1,22 @@
import { Hono } from 'hono';
import { Context } from 'hono';
type SiteConfig = {
name: string,
description: string,
baseUrl: string
};
const config: SiteConfig = {
name: "Slovocast",
description: "A no-nonesense Podcast hosting platform.",
baseUrl: "dev.slovocast.com"
};
const configMiddleware = new Hono();
configMiddleware.use((c: Context, next) => {
c.set('config', config);
next();
});
export SiteConfig, configMiddleware;