pseudosubs-v1/app.ts

29 lines
927 B
TypeScript
Raw Normal View History

let express = require('express');
let app = express();
app.use(express.static('dist'));
2018-12-16 03:49:59 +00:00
// Que era history??
// @ts-ignore
2018-12-16 03:49:59 +00:00
// 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);
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);