pseudosubs-v1/srv/index.ts

25 lines
622 B
TypeScript

import express from 'express';
export default (app:any) => {
app.use(express.json());
app.use(express.urlencoded());
//
// app.get('/foo', (req, res) => {
// res.json({msg: 'foo'});
// });
//
// app.post('/bar', (req, res) => {
// res.json(req.body);
// });
app.get("/");
app.post('/links', require('./LinksAnimes/obtenerLinks').obtenerLinks);
app.put('/links', require('./LinksAnimes/modificarLink').modificarLinks);
app.put('/a/', require('./Admin/crearAnime').crearAnime);
app.get('/a/', require('./Admin/obtenerTodosAnimes').obtenerTodosAnimes);
}