Advertisement
Aguezz

Make Server Lagging

Dec 12th, 2021
1,034
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. app.use('/api/auth', (req, res, next) => {
  2.     function getRandomInt(min, max) {
  3.       // eslint-disable-next-line no-param-reassign
  4.       min = Math.ceil(min);
  5.       // eslint-disable-next-line no-param-reassign
  6.       max = Math.floor(max);
  7.       return Math.floor(Math.random() * (max - min + 1)) + min;
  8.     }
  9.  
  10.     const time = getRandomInt(0, 1500);
  11.  
  12.     setTimeout(() => {
  13.       next();
  14.     }, time);
  15.   });
  16.   app.use('/api/exam', (req, res, next) => {
  17.     function getRandomInt(min, max) {
  18.       // eslint-disable-next-line no-param-reassign
  19.       min = Math.ceil(min);
  20.       // eslint-disable-next-line no-param-reassign
  21.       max = Math.floor(max);
  22.       return Math.floor(Math.random() * (max - min + 1)) + min;
  23.     }
  24.  
  25.     const time = getRandomInt(0, 1500);
  26.  
  27.     setTimeout(() => {
  28.       next();
  29.     }, time);
  30.   });
  31.   app.use('/api/profile', (req, res, next) => {
  32.     function getRandomInt(min, max) {
  33.       // eslint-disable-next-line no-param-reassign
  34.       min = Math.ceil(min);
  35.       // eslint-disable-next-line no-param-reassign
  36.       max = Math.floor(max);
  37.       return Math.floor(Math.random() * (max - min + 1)) + min;
  38.     }
  39.  
  40.     const time = getRandomInt(0, 1500);
  41.  
  42.     setTimeout(() => {
  43.       next();
  44.     }, time);
  45.   });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement