Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: not found after not router set.
- Loading branch information
1 parent
c17f049
commit 27cc7ae
Showing
9 changed files
with
56 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/web-koa/test/fixtures/base-app-middleware-router/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "ali-demo" | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/web-koa/test/fixtures/base-app-middleware-router/src/config/config.default.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
export const keys = 'key'; | ||
|
||
export const hello = { | ||
a: 1, | ||
b: 2, | ||
d: [1, 2, 3], | ||
}; |
24 changes: 24 additions & 0 deletions
24
packages/web-koa/test/fixtures/base-app-middleware-router/src/configuration.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Configuration, App } from '@midwayjs/decorator'; | ||
import { join } from 'path'; | ||
import { Application } from '../../../../src'; | ||
|
||
@Configuration({ | ||
imports: [ | ||
require('../../../../src') | ||
], | ||
importConfigs: [ | ||
join(__dirname, './config') | ||
] | ||
}) | ||
export class ContainerConfiguration { | ||
|
||
@App() | ||
app: Application; | ||
|
||
async onReady() { | ||
this.app.useMiddleware(async (ctx, next) => { | ||
ctx.body = 'abc'; | ||
return await next(); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters