- Introduced new page component for library topics with type checks. - Added migration scripts to update access rules for various collections including badges, curriculum versions, and themes. - Implemented PocketBase integration for managing collection access rules dynamically. - Ensured proper type validation for page props and metadata generation functions.
21 lines
551 B
TypeScript
21 lines
551 B
TypeScript
import 'dotenv/config';
|
|
import Fastify from 'fastify';
|
|
import cors from '@fastify/cors';
|
|
import documentRoutes from './routes/documents.js';
|
|
|
|
const PORT = parseInt(process.env['INGESTION_PORT'] ?? '3001', 10);
|
|
|
|
async function start(): Promise<void> {
|
|
const app = Fastify({ logger: true });
|
|
|
|
await app.register(cors, { origin: true });
|
|
await app.register(documentRoutes);
|
|
|
|
await app.listen({ port: PORT, host: '0.0.0.0' });
|
|
}
|
|
|
|
start().catch((err: unknown) => {
|
|
console.error('Failed to start ingestion service:', err);
|
|
process.exit(1);
|
|
});
|