Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
冷方冰 authored Sep 6, 2020
1 parent 7abf13b commit d709c77
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ import {
@StartApplication
export class TestClass extends App {

@ApplyMiddleware([assets('/examples/decorator/demo1/static'), cors()])
@ApplyMiddleware([assets('/static'), cors()])
@Middleware
async middle1(req: Req, res: Res, next: Function) {
console.log('middle1');
Expand All @@ -128,7 +128,11 @@ export class TestClass extends App {

@Get('/test')
async testHandle(req: Req, res: Res) {
// parse Cookie to a object
console.log(req.cookies.toObj());
// fetch url `${hostname}:${port}/test/?name=myName&age=20`
res.cookies.append('name', '123');
res.cookies.append('age', '22');
res.body = req.query;
}

Expand Down

0 comments on commit d709c77

Please sign in to comment.