mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
25 lines
777 B
TypeScript
25 lines
777 B
TypeScript
import { NestFactory } from "@nestjs/core";
|
|
import { NestExpressApplication } from "@nestjs/platform-express";
|
|
import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger";
|
|
import { AppModule } from "./app.module";
|
|
|
|
async function bootstrap() {
|
|
const app = await NestFactory.create<NestExpressApplication>(AppModule);
|
|
app.enableShutdownHooks();
|
|
|
|
// Setup API Docs
|
|
const options = new DocumentBuilder()
|
|
.setTitle("Listory")
|
|
.setDescription("Track and analyze your Spotify Listens")
|
|
.setVersion("1.0")
|
|
.addBearerAuth()
|
|
.addTag("user")
|
|
.addTag("listens")
|
|
.addTag("auth")
|
|
.build();
|
|
const document = SwaggerModule.createDocument(app, options);
|
|
SwaggerModule.setup("api/docs", app, document);
|
|
|
|
await app.listen(3000);
|
|
}
|
|
bootstrap();
|