Skip to content

Commit ad4cd64

Browse files
committed
f
1 parent 38b0bad commit ad4cd64

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

bench/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export PORT=3333
88

99
host="http://localhost:$PORT"
1010

11-
node "$(dirname $0)/server.js" &
11+
node "$(dirname $0)/server.cjs" &
1212

1313
pid=$!
1414

bench/server.cjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* eslint-disable @typescript-eslint/no-var-requires */
2-
const Koa = require('@eggjs/koa');
3-
const Router = require('../dist/commonjs');
2+
const { Application } = require('@eggjs/koa');
3+
const { Router } = require('../dist/commonjs');
44

5-
const app = new Koa();
5+
const app = new Application();
66
const router = new Router();
77

88
const ok = ctx => {
@@ -35,8 +35,8 @@ for (let i = n; i > 0; i--) {
3535
const child = new Router();
3636
if (useMiddleware) child.use((ctx, next) => next());
3737
child.get(`/:${''.padStart(i, 'a')}`, ok);
38-
child.nest('/grandchild', grandchild);
39-
router.nest(`/${i}/child`, child);
38+
// child.use('/grandchild', grandchild);
39+
// router.use(`/${i}/child`, child);
4040
}
4141

4242
if (process.env.DEBUG) {

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"utility": "^2.1.0"
3434
},
3535
"devDependencies": {
36-
"@eggjs/koa": "^2.18.0",
36+
"@eggjs/koa": "^2.18.1",
3737
"@eggjs/tsconfig": "^1.3.3",
3838
"@types/koa-compose": "^3.2.8",
3939
"@types/methods": "^1.1.4",
@@ -57,7 +57,8 @@
5757
"preci": "npm run lint && npm run prepublishOnly",
5858
"ci": "egg-bin cov",
5959
"contributor": "git-contributor",
60-
"prepublishOnly": "tshy && tshy-after"
60+
"prepublishOnly": "tshy && tshy-after",
61+
"bench": "cd bench && make"
6162
},
6263
"license": "MIT",
6364
"files": [

0 commit comments

Comments
 (0)