Skip to content

Commit 7fa2c42

Browse files
committed
feat: 2020.09.30
1 parent b72c469 commit 7fa2c42

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Cute-ReadingNotes/我为 Express 开了外挂.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ $ ts-node app.ts
4949
```bash
5050
Example app listening on port 3000!
5151
```
52-
心情愉快,服务跑起来了。接下来 Leo 使用 Express 的路由方法写了其他接口:
52+
服务跑起来了,心情愉快。
53+
接下来 Leo 使用 Express 的路由方法写了其他接口:
5354
```javascript
5455
// app.ts
5556

@@ -83,7 +84,7 @@ router.get('/user', (req: Request, res: Response) => {res.send('Hello api/user!'
8384

8485
export default router;
8586
```
86-
接着在 app.ts 中使用,由于[`express.Router()` ](http://expressjs.com/zh-cn/4x/api.html#router)是个中间件,所以可以使用 `app.use()` 来使用:
87+
接着在 app.ts 中使用,由于[`express.Router()` ](http://expressjs.com/zh-cn/4x/api.html#router)是个中间件,因此可以使用 `app.use()` 来使用:
8788
```typescript
8889
// app.ts
8990

@@ -150,7 +151,7 @@ leo.say();
150151
```
151152

152153
### 1.4 编译结果
153-
装饰器实际上非常很简单,编译出来以后,只是个函数,我们接着看。
154+
装饰器实际上非常简单,编译出来以后,只是个函数,我们接着看。
154155
这里以《1.3 示例代码》为例,看看它的编译结果:
155156
```javascript
156157
"use strict";

0 commit comments

Comments
 (0)