diff --git a/packages/backend/.mocharc.json b/packages/backend/.mocharc.json deleted file mode 100644 index cfc511621..000000000 --- a/packages/backend/.mocharc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "node-option": [ - "experimental-specifier-resolution=node" - ], - "slow": 1000, - "timeout": 30000, - "exit": true -} diff --git a/packages/backend/package.json b/packages/backend/package.json index 53b477163..f16a2e038 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -62,7 +62,6 @@ "koa-logger": "3.2.1", "koa-mount": "4.0.0", "koa-send": "5.0.1", - "koa-slow": "2.1.0", "koa-views": "7.0.2", "mfm-js": "0.23.3", "mime-types": "2.1.35", diff --git a/packages/backend/src/@types/koa-slow.d.ts b/packages/backend/src/@types/koa-slow.d.ts deleted file mode 100644 index e748e2cc9..000000000 --- a/packages/backend/src/@types/koa-slow.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -declare module 'koa-slow' { - import { Middleware } from 'koa'; - - interface ISlowOptions { - url?: RegExp; - delay?: number; - } - - function slow(options?: ISlowOptions): Middleware; - - namespace slow {} // Hack - - export = slow; -} diff --git a/packages/backend/src/env.ts b/packages/backend/src/env.ts index b60f89330..80b33dd19 100644 --- a/packages/backend/src/env.ts +++ b/packages/backend/src/env.ts @@ -13,7 +13,6 @@ export const envOption = { noDaemons: false, disableClustering: false, withLogTime: false, - slow: false, logLevel: LOG_LEVELS.info, }; diff --git a/packages/backend/src/server/index.ts b/packages/backend/src/server/index.ts index 7f8c79d07..3b5fd2bdd 100644 --- a/packages/backend/src/server/index.ts +++ b/packages/backend/src/server/index.ts @@ -9,7 +9,6 @@ import Koa from 'koa'; import Router from '@koa/router'; import mount from 'koa-mount'; import koaLogger from 'koa-logger'; -import * as slow from 'koa-slow'; import { IsNull } from 'typeorm'; import config from '@/config/index.js'; @@ -40,13 +39,6 @@ if (!['production', 'test'].includes(process.env.NODE_ENV || '')) { app.use(koaLogger(str => { serverLogger.info(str); })); - - // Delay - if (envOption.slow) { - app.use(slow({ - delay: 3000, - })); - } } // HSTS