File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { IncomingMessage } from 'http'
44
55const DefaultMaxBodySize = 10 * 1024 * 1024
66
7- interface RequestBodyParams {
7+ interface RequestBodyParams {
88 rawBody : string
99 body : { [ key : string ] : any }
1010}
@@ -55,7 +55,9 @@ export class CoaRequestBody {
5555
5656 protected async getRawBody ( contentLength : number ) {
5757 return await new Promise < string > ( ( resolve , reject ) => {
58- let raw = [ ] as Buffer [ ] ; let received = 0 ; let destroy = false
58+ let raw = [ ] as Buffer [ ]
59+ let received = 0
60+ let destroy = false
5961
6062 const onAborted = ( ) => {
6163 // console.log('onAborted')
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export class CoaApplication<T extends CoaContext> {
1616 echo . info ( '[server] Booting...' )
1717 }
1818
19- async start ( entry : string = '' ) : Promise < void > {
19+ async start ( entry : string = '' ) {
2020 // 设置端口
2121 const port = parseInt ( process . env . HOST || '' ) || 8000
2222
@@ -29,7 +29,7 @@ export class CoaApplication<T extends CoaContext> {
2929 }
3030
3131 // 监听请求
32- private async requestListener ( req : IncomingMessage , res : ServerResponse ) : Promise < void > {
32+ private async requestListener ( req : IncomingMessage , res : ServerResponse ) {
3333 const ctx = new this . Context ( req , res )
3434
3535 try {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { CoaApplication } from './CoaApplication'
55import { CoaContext , CoaContextConstructor } from './CoaContext'
66import { CoaRouter , CoaRouterConfig , CoaRouterRoutes } from './CoaRouter'
77
8- interface CoaHttpConfig extends CoaRouterConfig , CoaSwaggerConfig {
8+ interface CoaHttpConfig extends CoaRouterConfig , CoaSwaggerConfig {
99 routeDir : string
1010}
1111
You can’t perform that action at this time.
0 commit comments