wu-sheng commented on a change in pull request #170:
URL: https://github.com/apache/skywalking-website/pull/170#discussion_r545798026
##########
File path: content/zh/2020-12-13-skywalking-client-js-in-action/index.md
##########
@@ -0,0 +1,76 @@
+---
+title: SkyWalking-client-js实战体验
+date: 2020-12-13
+author: tristan-tsl
+description: 本文将详细介绍如何使用SkyWalking监控前端项目的页面加载情况及错误日志
+---
+
+
+
+首先我们前端项目是通过Nginx代理出来。我们需要修改Nginx添加SkyWalking-OAP端点,
让SkyWalking-OAP可以被浏览器访问到。我们的Nginx配置如下(Ingress-Nginx暂略)
+
+```
+ location /browser {
+ proxy_pass http://<your_skywalking_oap_ip>:12800;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ }
+```
+
+前端项目需要安装一下SkyWalking依赖:
+
+```
+npm install skywalking-client-js --save
+```
+
+每一个项目的package.json中的name都要用项目名称且不能与其他项目重复, version尽量保持有意义
+
+在路由/公共js中调整添加如下内容
+
+注意: router.beforeEach在实际项目中最好只声明一次
+
+```
+import ClientMonitor from 'skywalking-client-js'
+
+const router = createRouter() // 在router创建之后
Review comment:
`createRouter` 是vue相关语法,文章并没有做相应的交代。
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]