2018-11-20 01:28:50 +00:00
|
|
|
let express = require('express');
|
|
|
|
let app = express();
|
|
|
|
|
|
|
|
app.use(express.static('dist'));
|
2018-12-16 03:49:59 +00:00
|
|
|
|
|
|
|
// Que era history??
|
2018-11-22 16:46:11 +00:00
|
|
|
// @ts-ignore
|
2018-12-16 03:49:59 +00:00
|
|
|
// app.use(history());
|
2018-11-20 01:28:50 +00:00
|
|
|
|
2018-11-21 17:58:16 +00:00
|
|
|
app.use(express.urlencoded());
|
|
|
|
app.use(express.json());
|
|
|
|
|
2018-11-20 01:28:50 +00:00
|
|
|
app.get("/");
|
|
|
|
|
2018-11-21 17:58:16 +00:00
|
|
|
app.post('/links', require('./srv/LinksAnimes/obtenerLinks').obtenerLinks);
|
|
|
|
app.put('/links', require('./srv/LinksAnimes/modificarLink').modificarLinks);
|
|
|
|
|
2018-12-16 03:49:59 +00:00
|
|
|
app.put('/a/', require('./srv/Admin/crearAnime').crearAnime);
|
|
|
|
app.get('/a/', require('./srv/Admin/obtenerTodosAnimes').obtenerTodosAnimes);
|
|
|
|
|
|
|
|
app.get('/op/:id', require('./srv/Admin/OP/obtenerOPs').obtenerOPs);
|
|
|
|
app.post('/op/', require('./srv/Admin/OP/nuevoOP').nuevoOP);
|
|
|
|
|
|
|
|
app.get('/eps/variantes/:anime_ID', require('./srv/Admin/Eps/obtenerVariantes').obtenerVariantes);
|
|
|
|
app.get('/eps/links/:opcion_ID', require('./srv/Admin/Eps/obtenerLinks').obtenerLinks);
|
|
|
|
app.post('/eps/links/', require('./srv/Admin/Eps/crearLink').crearLink);
|
|
|
|
|
|
|
|
app.listen(8080);
|