Skip to content

Commit b72c469

Browse files
committed
feat: 2020.09.30
1 parent c8b0555 commit b72c469

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ OvernightJS/core 结构设计上还是比较简单,大致如下架构:
462462
在 OvernightJS/core 中,主要提供两个大类: `Server` 类和 `Decorators` 相关方法。
463463
其中 `Server` 类中的 `addConterllers` 方法是关键,下一节将详细介绍。哈哈
464464

465-
 ## 5. OvernightJS/core 与 Express 关联
465+
## 5. OvernightJS/core 与 Express 关联
466466
回顾下 Express ,我们经常通过 `app.use(path, route)` 来定义一个接口:
467467
```typescript
468468
app.use(path, route);
@@ -520,7 +520,7 @@ public addControllers(
520520
那么**使用 OvernightJS 跟没有使用有什么区别呢?**
521521
下面我们分别通过 OvernightJS 和 Express 实现相同功能,功能包括:本地启动 4000 端口,支持 `api/users/:id` 接口。
522522

523-
 ## 1. OvernightJS 实现
523+
## 1. OvernightJS 实现
524524
首先实现入口文件,其中通过实例化 `ServerController` 类,并执行实例化结构的 `start` 方法来启动服务:
525525
```typescript
526526
// customApp.ts

0 commit comments

Comments
 (0)