Skip to content

Commit

Permalink
chore: stash
Browse files Browse the repository at this point in the history
  • Loading branch information
npmstudy committed Nov 15, 2023
1 parent aad4fc0 commit fbf2e21
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/fn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ export class Fn extends Plugable {
supportMethods[0] +
' request from client';
}

log('beforeOne end');
await next();
// log('beforeOne end');
};
}
}
7 changes: 7 additions & 0 deletions packages/core/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ export class RpcServer {
this.app = new Koa();
this.app.use(bodyParser());
this.use = this.app.use;
this.app.use(async (ctx, next) => {
await next();
});
}

/**
Expand Down Expand Up @@ -180,6 +183,10 @@ export class RpcServer {

this.config.after(this);

this.app.use(function (ctx, next) {
ctx.body = 'default';
});

this.app.listen(_port, (err) => {
if (err) {
console.error(err);
Expand Down

0 comments on commit fbf2e21

Please sign in to comment.