Skip to content

Instantly share code, notes, and snippets.

@spiritbroski
Created July 13, 2020 00:39
Show Gist options
  • Save spiritbroski/78153b2fd930cfad7181b008fec6dab1 to your computer and use it in GitHub Desktop.
Save spiritbroski/78153b2fd930cfad7181b008fec6dab1 to your computer and use it in GitHub Desktop.
import { NestFactory } from '@nestjs/core';
import { NestExpressApplication } from '@nestjs/platform-express';
import { join } from 'path';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create<NestExpressApplication>(
AppModule,
);
app.useStaticAssets(join(__dirname, '..', 'public'));
app.setBaseViewsDir(join(__dirname, '..', 'views'));
app.setViewEngine('hbs');
await app.listen(3000);
}
bootstrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment