chore: crush git history - reborn from consolidation on 2026-03-10

This commit is contained in:
John Dvorak
2026-03-10 00:00:00 -07:00
commit d278c4b105
313 changed files with 87549 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
import fp from 'fastify-plugin'
export interface DatabasePluginOptions {
url: string
}
export const databasePlugin = fp(async (fastify, opts: DatabasePluginOptions) => {
// In a real app, this would connect to PostgreSQL, MongoDB, etc.
const db = {
users: new Map<string, { id: string; name: string; email: string }>(),
url: opts.url,
}
fastify.decorate('db', db)
fastify.addHook('onClose', async () => {
// Cleanup connections
})
})
// Type augmentation for Fastify
declare module 'fastify' {
interface FastifyInstance {
db: {
users: Map<string, { id: string; name: string; email: string }>
url: string
}
}
}