Skip to content

Commit bba261a

Browse files
committed
feat: 更新文档
1 parent b5bc8ce commit bba261a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

webpack4-ssr-config/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ webpack4-ssr-config
9090
```
9191
#### `index.js`
9292
`index.js` 是我们应用程序的「通用 entry」,对外导出一个 createApp 函数。这里使用工厂模式为为每个请求创建一个新的根 Vue 实例,
93-
从而避免server端单例模式,如果我们在多个请求之间使用一个共享的实例,很容易导致交叉请求状态污染 (cross-request state pollution)。
94-
93+
从而避免server端单例模式,如果我们在多个请求之间使用一个共享的实例,很容易导致交叉请求状态污染。
9594
#### `entry-client.js`:
9695

9796
客户端 entry 只需创建应用程序,并且将其挂载到 DOM 中:
@@ -245,7 +244,7 @@ export function createStore() {
245244
}
246245
```
247246

248-
### http请求
247+
### Http请求
249248
http使用Axios库封装
250249

251250
```js
@@ -344,7 +343,7 @@ addResponseInterceptor(
344343
}
345344
)
346345
```
347-
这样,.vue中间中直接调用this.$http.get()等等
346+
这样,.vue中间中直接调用this.$http.get()this.$http.post()...
348347

349348
### cookies穿透
350349
在ssr期间我们需要截取客户端的cookie,保持用户会话唯一性。
@@ -415,7 +414,8 @@ app.on('error', (err) => {
415414
app.listen(appConfig.appPort)
416415
```
417416

418-
#### `vue.koa.ssr.js` vue koa2 ssr中间件
417+
#### `vue.koa.ssr.js`
418+
vue koa2 ssr中间件
419419

420420
* 开发模式直接使用`setup.dev.server.js`webpack hot热更新
421421
* 生产模块直接读取`dist`目录的文件
@@ -597,7 +597,7 @@ location / {
597597
* [pm2](http://www.cnblogs.com/chyingp/p/pm2-documentation.html)
598598

599599

600-
[Demo地址](http://www.ml-ui.com/ssr) 服务器带框垃圾,将就看看。
600+
[Demo地址](http://www.ml-ui.com/ssr) 服务器带宽垃圾,将就看看。
601601

602602
[git仓库地址](https://github.com/zdliuccit/vue-webpack-config/tree/master/webpack4-ssr-config)
603603

0 commit comments

Comments
 (0)