- Added a new "status" field to the themes collection with options: draft, published, and rejected. - Updated the migration script to include the new field and its options. - Created a new ingestion migration script to ensure the "status" field includes "rejected" as an option if not already present. - Added multiple hot-update files for webpack to support the new changes in the frontend.
21 lines
545 B
TypeScript
21 lines
545 B
TypeScript
import 'dotenv/config';
|
|
import Fastify from 'fastify';
|
|
import cors from '@fastify/cors';
|
|
import { curriculumRoutes } from './routes/curriculum.js';
|
|
import { employeeRoutes } from './routes/employee.js';
|
|
|
|
const app = Fastify({ logger: true });
|
|
|
|
await app.register(cors, { origin: true });
|
|
await app.register(curriculumRoutes);
|
|
await app.register(employeeRoutes);
|
|
|
|
const port = parseInt(process.env['CURRICULUM_PORT'] ?? '3003', 10);
|
|
|
|
try {
|
|
await app.listen({ port, host: '0.0.0.0' });
|
|
} catch (err) {
|
|
app.log.error(err);
|
|
process.exit(1);
|
|
}
|