hrhub / api /src /main.ts
Roger Surf
feat: add NestJS API with Handlebars - basic dashboard working
b7e75fd
raw
history blame contribute delete
606 Bytes
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);
// Configurar Handlebars
app.setBaseViewsDir(join(__dirname, '..', 'views'));
app.setViewEngine('hbs');
// Servir arquivos estáticos (CSS/JS)
app.useStaticAssets(join(__dirname, '..', 'public'));
await app.listen(3000);
console.log('🚀 Application running on: http://localhost:3000');
}
bootstrap();