mirror of
https://github.com/stonith404/pingvin-share.git
synced 2024-11-15 20:00:33 +01:00
16 lines
545 B
TypeScript
16 lines
545 B
TypeScript
|
import { ClassSerializerInterceptor, ValidationPipe } from "@nestjs/common";
|
||
|
import { NestFactory, Reflector } from "@nestjs/core";
|
||
|
import * as fs from "fs";
|
||
|
import { AppModule } from "./app.module";
|
||
|
async function bootstrap() {
|
||
|
const app = await NestFactory.create(AppModule);
|
||
|
app.useGlobalPipes(new ValidationPipe());
|
||
|
app.useGlobalInterceptors(new ClassSerializerInterceptor(app.get(Reflector)));
|
||
|
|
||
|
await fs.promises.mkdir("./uploads/_temp", { recursive: true });
|
||
|
|
||
|
app.setGlobalPrefix("api");
|
||
|
await app.listen(8080);
|
||
|
}
|
||
|
bootstrap();
|