Files
schafkop-neu/backend/src/main.ts
Valentin Heiserer 46899ef7be feat: integrate Tailwind CSS for improved styling and layout
- Added Tailwind CSS and its Vite plugin to the frontend project.
- Updated App.svelte to enhance UI with Tailwind classes, including a new layout for the serial monitor and command tester.
- Improved logging functionality by increasing log history and adding more detailed log messages.
- Refactored SendBox.svelte for consistent styling with Tailwind.
- Enhanced Pico firmware to support structured event logging and command parsing.
- Updated README_PICO_SERIAL.md to provide comprehensive documentation on serial communication and backend integration.
- Added .dockerignore to optimize Docker builds by excluding unnecessary files.
2025-08-30 14:18:57 +02:00

30 lines
930 B
TypeScript

import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { NestExpressApplication } from '@nestjs/platform-express';
import { join } from 'path';
async function bootstrap() {
const app = await NestFactory.create<NestExpressApplication>(AppModule, {
bufferLogs: true,
});
// Serve static frontend (built assets copied to /app/public in container)
const publicDir = join(process.cwd(), 'public');
app.useStaticAssets(publicDir);
// Basic health endpoint
app.getHttpAdapter().get('/healthz', (_req: any, res: any) => {
res.json({ ok: true, ts: Date.now() });
});
const port = Number(process.env.PORT || 3000);
await app.listen(port);
// eslint-disable-next-line no-console
console.log(`[bootstrap] Listening on :${port}`);
}
bootstrap().catch((e) => {
// eslint-disable-next-line no-console
console.error('Fatal bootstrap error', e);
process.exit(1);
});