File size: 606 Bytes
b7e75fd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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();