-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
30 lines (25 loc) · 650 Bytes
/
app.js
File metadata and controls
30 lines (25 loc) · 650 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const app = require('express')();
const sjd = require('swagger-jsdoc');
const swaggerui = require('swagger-ui-express');
const swaggerDefinition = {
openapi: '3.0.0',
info: {
title: 'Quick Shipping NodeJS APIs',
version: '1.0.0',
description:
'APIs de NodeJS de Quick Shipping.',
},
servers: [
{
url: 'https://node.qs.gt',
description: 'Servidor de produccion.'
},
],
};
const options = {
swaggerDefinition,
apis: ['./qs-apis.yaml']
}
const swaggerSpec = sjd(options)
app.use(swaggerui.serve, swaggerui.setup(swaggerSpec));
app.listen(3000);