29 lines
927 B
TypeScript
29 lines
927 B
TypeScript
let express = require('express');
|
|
let app = express();
|
|
|
|
app.use(express.static('dist'));
|
|
|
|
// Que era history??
|
|
// @ts-ignore
|
|
// app.use(history());
|
|
|
|
app.use(express.urlencoded());
|
|
app.use(express.json());
|
|
|
|
app.get("/");
|
|
|
|
app.post('/links', require('./srv/LinksAnimes/obtenerLinks').obtenerLinks);
|
|
app.put('/links', require('./srv/LinksAnimes/modificarLink').modificarLinks);
|
|
|
|
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);
|