File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export PORT=3333
88
99host=" http://localhost:$PORT "
1010
11- node " $( dirname $0 ) /server.js " &
11+ node " $( dirname $0 ) /server.cjs " &
1212
1313pid=$!
1414
Original file line number Diff line number Diff line change 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 ( ) ;
66const router = new Router ( ) ;
77
88const 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
4242if ( process . env . DEBUG ) {
Original file line number Diff line number Diff line change 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" ,
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" : [
You can’t perform that action at this time.
0 commit comments