mirror of
https://github.com/Vale54321/schafkop-neu.git
synced 2025-12-13 10:39:33 +01:00
- 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.
30 lines
930 B
TypeScript
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);
|
|
});
|