| 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(); |