Skip to content

Commit ae0ed9f

Browse files
committed
style: 文档格式调整,提高阅读效果
1 parent b14076b commit ae0ed9f

File tree

14 files changed

+25
-3
lines changed

14 files changed

+25
-3
lines changed

code/express/apps/static-source-demo/Readme.md renamed to code/express/apps/static-source-demo/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Express框架不仅给出了前后端混合开发的解决方案,针对不同
1919

2020
```js
2121
const express = require('express')
22+
2223
const app = express()
2324
// 服务启动端口
2425
const port = 3000

docs/microservice/docker/docker-backup.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* - ./scripts/docker network xxx 网络相关
1212
*/
1313
const { execShell } = require('./.exec')
14+
1415
const scriptName = process.argv[2]
1516

1617
/**

docs/read-books/cs-books/ES6标准入门.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3095,9 +3095,9 @@ Array.of(3).length // 1
30953095
弥补数组构造函数`Array()`的不足。因为参数个数的不同,会导致`Array()`的行为有差异。
30963096

30973097
```js
3098-
new Array() // []
3098+
[] // []
30993099
Array.from({ length: 3 }) // [, , ,]
3100-
new Array(3, 11, 8) // [3, 11, 8]
3100+
;[3, 11, 8] // [3, 11, 8]
31013101
```
31023102

31033103
`Array()`方法没有参数、一个参数、三个参数时,返回的结果都不一样。
@@ -4854,6 +4854,7 @@ Object.fromEntries(map)
48544854
```js
48554855
// url模块中获取URLSearchParams
48564856
const { URLSearchParams } = require('node:url')
4857+
48574858
Object.fromEntries(new URLSearchParams('name=bob&age=24'))
48584859
// { name: "bob", age: 24 }
48594860
```

docs/read-books/cs-books/更了不起的Node.js.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,6 +1283,7 @@ event.setMaxListeners(100)
12831283

12841284
```js
12851285
const eventEmitter = require('node:events')
1286+
12861287
const myEmitter = new EventEmitter()
12871288

12881289
function testConnection(param) {

docs/server-end/framework/egg/tutorial/快速入门.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ $ npm i moment --save
321321
```js
322322
// app/extend/helper.js
323323
const moment = require('moment')
324+
324325
exports.relativeTime = time => moment(new Date(time * 1000)).fromNow()
325326
```
326327

docs/server-end/framework/egg/tutorial/服务.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ module.exports = (app) => {
8484

8585
// app/controller/user.js
8686
const Controller = require('egg').Controller
87+
8788
class UserController extends Controller {
8889
async info() {
8990
const { ctx } = this
@@ -96,6 +97,7 @@ module.exports = UserController
9697

9798
// app/service/user.js
9899
const Service = require('egg').Service
100+
99101
class UserService extends Service {
100102
// 默认不需要提供构造函数。
101103
// constructor(ctx) {

docs/server-end/framework/express/tutorial/模板项目.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ lsof -i:3000
9696

9797
```js
9898
const express = require('express')
99+
99100
const router = express.Router()
100101

101102
/* GET users listing. */
@@ -110,6 +111,7 @@ module.exports = router
110111

111112
```js
112113
const express = require('express')
114+
113115
const router = express.Router()
114116

115117
/* GET home page. */

docs/server-end/framework/express/tutorial/静态文件.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Express框架不仅给出了前后端混合开发的解决方案,针对不同
2424

2525
```js
2626
const express = require('express')
27+
2728
const app = express()
2829
// 服务启动端口
2930
const port = 3000

docs/server-end/framework/koa/tutorial/Application对象.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ app2.proxy = true
9191

9292
```js
9393
const Koa = require('koa')
94+
9495
const app = new Koa()
9596
// 监听3000端口
9697
app.listen(3000)
@@ -105,6 +106,7 @@ app.listen(3000)
105106
```js
106107
const http = require('node:http')
107108
const Koa = require('koa')
109+
108110
const app = new Koa()
109111
const server = http.createServer(app.callback())
110112
// 监听端口
@@ -115,11 +117,13 @@ server.listen(3000)
115117

116118
```js
117119
const http = require('node:http')
120+
118121
const server = http.createServer(app.callback())
119122
// 监听端口
120123
server.listen(3000)
121124

122125
const https = require('node:https')
126+
123127
const httpsServer = https.createServer(app.callback())
124128
httpsServer.listen(6000)
125129
```

docs/server-end/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export const ServerEndSidebar = [
114114
},
115115
{
116116
text: '设计模式',
117-
link: 'design-patterns/Readme.md',
117+
link: 'design-patterns/README.md',
118118
},
119119
{
120120
text: 'Linux系统',

0 commit comments

Comments
 (0)