4d05f7c1b1
apps/message-demo: Alice creates a thread, Bob joins; live two-way chat, typing, read receipts (useMessages now exposes reads[]). Dev-only /v1/dev/token endpoint (gated by IIOS_DEV_TOKENS) so the browser can auth. .env autoloaded (dotenv). Realtime smoke script passes end-to-end (message + unread + receipt). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
20 lines
644 B
TypeScript
20 lines
644 B
TypeScript
import 'dotenv/config';
|
|
import 'reflect-metadata';
|
|
import { NestFactory } from '@nestjs/core';
|
|
import { ValidationPipe } from '@nestjs/common';
|
|
import { AppModule } from './app.module';
|
|
|
|
async function bootstrap(): Promise<void> {
|
|
const app = await NestFactory.create(AppModule);
|
|
app.useGlobalPipes(
|
|
new ValidationPipe({ whitelist: true, forbidNonWhitelisted: true, transform: true }),
|
|
);
|
|
app.enableCors({ origin: true, credentials: true });
|
|
const port = Number(process.env.PORT ?? 3200);
|
|
await app.listen(port);
|
|
// eslint-disable-next-line no-console
|
|
console.log(`iios-service listening on :${port}`);
|
|
}
|
|
|
|
void bootstrap();
|