Commit 447e96bd authored by soheib's avatar soheib
Browse files

update calculate result proccess from scratch

parent 857df234
1import { NestFactory } from '@nestjs/core';
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'
async function bootstrap() {
const app = await NestFactory.create(AppModule);
......@@ -9,6 +10,28 @@ async function bootstrap() {
credentials: true,
})
const configDocument = new DocumentBuilder()
.setTitle('Instagram Service')
.setDescription('The Instagram Service API description')
.setVersion('1.0')
.setBasePath('/api')
.addTag('Instagram Service')
.build()
const document = SwaggerModule.createDocument(app, configDocument)
app.use('/api/docs/swagger.json', (req, res) => {
res.send(document)
})
SwaggerModule.setup('/api/docs', app, null, {
explorer: true,
swaggerOptions: {
docExpansion: 'list',
filter: true,
showRequestDuration: true,
},
})
await app.listen(4001).then(() => {
console.log(`server start on port 4001`);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment