merge:GWM
This commit is contained in:
commit
6d54380f49
@ -4,7 +4,15 @@ module.exports = app => {
|
||||
const master = require("../controllers/master.controller.js");
|
||||
var router = require("express").Router();
|
||||
|
||||
|
||||
/**
|
||||
* @openapi
|
||||
* /api/EntitiesList:
|
||||
* get:
|
||||
* description: Welcome to swagger-jsdoc!
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Returns a mysterious string.
|
||||
*/
|
||||
// Retrieve all Tutorials
|
||||
router.get("/EntitiesList", financials.findAllEntities);
|
||||
// get statment master data
|
||||
|
||||
399
package-lock.json
generated
399
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -15,10 +15,14 @@
|
||||
"dotenv": "^10.0.0",
|
||||
"express": "^4.17.1",
|
||||
"mssql": "^7.2.0",
|
||||
"nodemon": "^2.0.12",
|
||||
"request": "^2.88.2",
|
||||
"sequelize": "^6.6.5",
|
||||
"swagger-jsdoc": "^6.1.0",
|
||||
"swagger-ui-express": "^4.1.6",
|
||||
"winston": "^3.3.3",
|
||||
"winston-daily-rotate-file": "^4.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"nodemon": "^2.0.12"
|
||||
}
|
||||
}
|
||||
|
||||
38
server.js
38
server.js
@ -1,12 +1,46 @@
|
||||
require('dotenv').config();
|
||||
const express = require('express')
|
||||
const app = express()
|
||||
app.use(express.json())
|
||||
|
||||
|
||||
const swaggerJsdoc = require('swagger-jsdoc');
|
||||
const swaggerUi = require('swagger-ui-express');
|
||||
|
||||
|
||||
|
||||
const options = {
|
||||
definition: {
|
||||
openapi: '3.0.0',
|
||||
info: {
|
||||
title: 'Smc_cet_financials',
|
||||
version: '1.0.0',
|
||||
},
|
||||
},
|
||||
apis: ['./app/routes/routes.js'], // files containing annotations as above
|
||||
};
|
||||
|
||||
const swaggerDocument = swaggerJsdoc(options);
|
||||
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument));
|
||||
|
||||
|
||||
/**
|
||||
* @openapi
|
||||
* /:
|
||||
* get:
|
||||
* description: Welcome to swagger-jsdoc!
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Returns a mysterious string.
|
||||
*/
|
||||
|
||||
|
||||
app.get("/", (req, res) => {
|
||||
res.json({ message: "Welcome to the application." });
|
||||
});
|
||||
|
||||
app.use(express.json())
|
||||
|
||||
|
||||
|
||||
require("./app/routes/routes.js")(app);
|
||||
|
||||
const PORT_NUMBER = process.env.SERVER_PORT
|
||||
|
||||
Loading…
Reference in New Issue
Block a user