Flesh out dd0c/portal: service CRUD, discovery API, Meilisearch search, data layer
- Service API: list (filtered by type/owner/lifecycle/tier), detail, upsert, delete, ownership summary - Discovery API: trigger AWS/GitHub scans, scan history, staged update review (apply/reject) - Search: Meilisearch full-text with PG ILIKE fallback, reindex endpoint - Data layer: withTenant() RLS wrapper, Zod config with MEILI_URL/MEILI_KEY - Fastify server entry point
This commit is contained in:
15
products/04-lightweight-idp/src/config/index.ts
Normal file
15
products/04-lightweight-idp/src/config/index.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
const envSchema = z.object({
|
||||
PORT: z.coerce.number().default(3000),
|
||||
DATABASE_URL: z.string().default('postgresql://localhost:5432/dd0c_portal'),
|
||||
REDIS_URL: z.string().default('redis://localhost:6379'),
|
||||
MEILI_URL: z.string().default('http://localhost:7700'),
|
||||
MEILI_KEY: z.string().default(''),
|
||||
JWT_SECRET: z.string().min(32).default('dev-secret-change-me-in-production!!'),
|
||||
CORS_ORIGIN: z.string().default('*'),
|
||||
LOG_LEVEL: z.string().default('info'),
|
||||
});
|
||||
|
||||
export const config = envSchema.parse(process.env);
|
||||
export type Config = z.infer<typeof envSchema>;
|
||||
Reference in New Issue
Block a user