Listory/src/main.ts

16 lines
486 B
TypeScript
Raw Normal View History

2020-01-25 22:19:14 +01:00
import { NestFactory } from "@nestjs/core";
2020-01-26 19:07:15 +01:00
import { NestExpressApplication } from "@nestjs/platform-express";
import { join } from "path";
2020-01-25 22:19:14 +01:00
import { AppModule } from "./app.module";
async function bootstrap() {
2020-01-26 19:07:15 +01:00
const app = await NestFactory.create<NestExpressApplication>(AppModule);
app.useStaticAssets(join(__dirname, "frontend", "public"));
app.setBaseViewsDir(join(__dirname, "frontend", "views"));
app.setViewEngine("mustache");
2020-01-25 22:19:14 +01:00
await app.listen(3000);
}
bootstrap();