Files
mirccloud/server/src/db/index.ts
T
Jason Preston c59ac7ad0f feat: initial mIRCcloud.com scaffold
- Express + TypeScript backend with IRC connection manager
- React + Vite frontend with mIRC-inspired theme
- Drizzle ORM + PostgreSQL schema (users, connections, channels, messages)
- Redis pub/sub for real-time WebSocket delivery across replicas
- IRC color code parser (16 + 99 extended palette)
- Kubernetes manifests for homecloud deployment
- Multi-stage Dockerfile with non-root user
- docker-compose for local development
2026-08-08 23:50:08 -06:00

17 lines
390 B
TypeScript

import { drizzle } from 'drizzle-orm/postgres-js';
import postgres from 'postgres';
import { config } from '../config.js';
import * as schema from './schema.js';
const client = postgres(config.DATABASE_URL, {
max: 20,
idle_timeout: 20,
connect_timeout: 10,
});
export const db = drizzle(client, { schema });
export async function closeDb(): Promise<void> {
await client.end();
}