Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
shahriar
instagram-service
Commits
447e96bd
Commit
447e96bd
authored
Aug 16, 2021
by
soheib
Browse files
update calculate result proccess from scratch
parent
857df234
Changes
21
Hide whitespace changes
Inline
Side-by-side
src/main.ts
View file @
447e96bd
1
import
{
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`
);
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment