Skip to content

Commit

Permalink
docs: add two docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chaxus committed Aug 3, 2024
1 parent 2d0ae93 commit af3d030
Show file tree
Hide file tree
Showing 44 changed files with 1,877 additions and 301 deletions.
568 changes: 280 additions & 288 deletions packages/cpro/readme.md

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions packages/debug/koaStatic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ const __dirname = path.dirname(__filename);

const app = new Koa();

const PORT = 5555
const PORT = 5555;

const STATIC_DIR = 'dist'
const STATIC_DIR = 'dist';

// Serve static files from the 'dist' directory
app.use(serve(path.join(__dirname, STATIC_DIR)));
Expand All @@ -20,4 +20,3 @@ app.use(serve(path.join(__dirname, STATIC_DIR)));
app.listen(PORT, () => {
console.log(`Server is running on http://localhost:${PORT}`);
});

9 changes: 8 additions & 1 deletion packages/debug/nginxconf/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

1. 使用命令行参数指定配置文件路径

```sh
Expand All @@ -12,7 +11,9 @@ nginx -c /path/to/your/nginx.conf
```sh
nginx -t -c /path/to/your/nginx.conf
```

重启

```sh
nginx -s reload
```
Expand Down Expand Up @@ -55,13 +56,17 @@ brew services restart nginx
你也可以直接使用 Nginx 的-s 参数来停止服务。有两种停止方式:

快速停止(不等待处理完当前请求):

```sh
sudo nginx -s stop
```

优雅停止(等待处理完当前请求后再停止):

```sh
sudo nginx -s quit
```

4. 关闭

进入 Nginx 安装目录的 sbin 文件夹(如果尚未进入)。
Expand All @@ -70,9 +75,11 @@ sudo nginx -s quit
在某些情况下,你可能需要手动停止 Nginx 服务。这通常涉及到找到 Nginx 的主进程号(PID),并使用 kill 命令发送相应的信号来停止进程。

查找 Nginx 主进程的 PID:可以使用 ps 命令结合 grep 来查找,如:

```sh
ps -ef | grep nginx
```

发送停止信号:根据找到的 PID,使用 kill 命令发送 TERM(快速停止)或 INT(优雅停止)信号。例如,kill -TERM <pid>或 kill -INT <pid>。此外,kill -HUP <pid>也可以用于平滑重启 Nginx,但这实际上是发送了一个挂起信号,而不是停止信号。

使用 brew 服务命令:
Expand Down
8 changes: 8 additions & 0 deletions packages/docs/.vitepress/langs/cn/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ const themeCnConfig: DefaultTheme.Config = {
text: '可视化渲染引擎',
link: '/cn/src/article/visual.md',
},
{
text: 'web 端文档预览方案',
link: '/cn/src/article/docPreview.md',
},
{
text: '实现自适应码率 Web 视频加密播放:前后端的挑战与解决方案',
link: '/cn/src/article/video.md',
},
],
},
],
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added packages/docs/assets/article/docPreview/xdoc.webp
Binary file not shown.
Binary file added packages/docs/assets/article/docPreview/xml.webp
Binary file not shown.
Binary file not shown.
Binary file added packages/docs/assets/article/video/bili_demo.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added packages/docs/assets/article/video/red_book.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added packages/docs/assets/article/video/ts_demo.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit af3d030

Please sign in to comment.