Skip to content

Commit

Permalink
Merge pull request #288 from fga-eps-mds/feature-listaMateriasProxSem…
Browse files Browse the repository at this point in the history
…estre

Parte visual da RF02 com atualizações
  • Loading branch information
GabriellyAssuncao authored Apr 24, 2022
2 parents 03e90da + a16e299 commit ec11d82
Show file tree
Hide file tree
Showing 3 changed files with 1,225 additions and 14,649 deletions.
14 changes: 13 additions & 1 deletion api/routes/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ const express = require('express');
const app = express();

const PORT = 3000
const cursos = require("./services/scraping/equivalencias.json")
const cursos = require("../../api/services/scraping/equivalencias.json")
var curso

const dadosCursos = require("../../api/services/scraping/dadosDoCurso.json")

app.use((req, res, next) => {
res.header({"Access-Control-Allow-Origin": "*"});
next();
})

app.listen(
PORT,
() => console.log(`Em: http://localhost:${PORT}`)
Expand All @@ -30,3 +37,8 @@ app.get('/equivalencias/:id', (req,res) =>{
}
if (i == cursos.length) res.send('Matéria não encontrada.')
})

//rota que responde com os dados do arquivo dadosDoCurso.json
app.get('/dadosDoCurso', (req,res) =>{
res.send(dadosCursos)
})
Loading

0 comments on commit ec11d82

Please sign in to comment.