From 5dbcd597cda8b19725e98d64135e8ea18c094bc4 Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Sat, 2 Mar 2024 12:57:48 -0500 Subject: [PATCH] Add middleware. --- app/src/middleware/config.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 app/src/middleware/config.ts diff --git a/app/src/middleware/config.ts b/app/src/middleware/config.ts new file mode 100644 index 0000000..550a6c8 --- /dev/null +++ b/app/src/middleware/config.ts @@ -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;