🅿️ Paginating covers response

This commit is contained in:
2021-05-03 22:35:00 -07:00
parent a4f9c82847
commit 436bbc56a1
6 changed files with 39 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
import express, { Request, Response, Router, Express } from "express";
import bodyParser from "body-parser";
import router from "./route";
import { default as paginate } from "express-paginate";
// call express
const app: Express = express(); // define our app using express
@@ -8,6 +9,7 @@ const app: Express = express(); // define our app using express
// configure app to use bodyParser for
// Getting data from body of requests
app.use(bodyParser.json());
app.use(paginate.middleware(10, 50));
app.use(bodyParser.urlencoded({ extended: true }));