Skip to content
Snippets Groups Projects
Commit 3ba2d606 authored by Renzo Beux's avatar Renzo Beux
Browse files

fix: fix project initialization

parent b2a3291d
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
......@@ -2,9 +2,15 @@
"name": "repp_backend",
"version": "1.0.0",
"description": "Herramienta de calculo del requerimiento energetico ponderado de una poblacion, llamado REPP.",
"main": "index.js",
"dependencies": {},
"main": "index.ts",
"dependencies": {
"express": "^4.17.1",
"swagger-jsdoc": "^6.1.0",
"swagger-ui-express": "^4.1.6"
},
"devDependencies": {
"@types/express": "^4.17.13",
"@types/node": "^16.7.10",
"@typescript-eslint/eslint-plugin": "^4.29.3",
"@typescript-eslint/parser": "^4.29.3",
"eslint": "^7.32.0",
......@@ -15,9 +21,13 @@
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^4.3.8",
"jest": "^27.0.6",
"lint-staged": "^11.1.2"
"lint-staged": "^11.1.2",
"nodemon": "^2.0.12",
"ts-node": "^10.2.1",
"typescript": "^4.4.2"
},
"scripts": {
"start": "nodemon ./src/index.ts",
"test": "jest",
"pretest": "./node_modules/.bin/eslint --ignore-path .gitignore . --fix"
},
......
import express, {Request,Response,Application} from 'express';
import express, {Application} from 'express';
const swaggerJsDoc = require('swagger-jsdoc')
const swaggerUi = require('swagger-ui-express')
......@@ -19,12 +19,15 @@ const swaggerOptions = {
},
apis: ['src/routes.ts']
}
const swaggerDocs = swaggerJsDoc(swaggerOptions)
const swaggerDocs = swaggerJsDoc(swaggerOptions)
// middlewares
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocs))
function q(){
return undefined
}
app.use(require('./routes.ts'))
......
import express, {Request,Response,Application} from 'express';
import {Request,Response,Application} from 'express';
const {parseExcel} = require('./Controllers/ExcelController')
const { Router } = require('express');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment