PupTester/README.md

31 lines
690 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# SeoServer
#### node版本
16及以上
#### ng配置
```
if ($http_user_agent ~* "googlebot|Mediapartners-Google|bingbot|google-structured-data-testing-tool|baiduspider|360Spider|Sogou Spider|Yahoo! Slurp China|^$")
{#判断如果是网络爬虫转发到node服务器下
proxy_pass http://www.test.com:3000;
break;
}
```
#### 依赖安装、运行
```bash
// 依赖
npm install
npm install pm2 -g
node node_modules/puppeteer/install.js // 安装无头浏览器可能会缺依赖可参见https://www.cnblogs.com/ilizhu/p/14504049.html
// 启动服务
pm2 start index.js
```
#### 配置
config中修改redis地址端口、node服务端口、以及转发host