简体   繁体   English

我是否需要使用WebSockets将node.js与PhantomJS接口?

[英]Do I need to use WebSockets to interface node.js with PhantomJS?

I couldn't find it referenced in the documentation but since PhantomJs is now at 2.1, Is there a way to use a WebSocket to interface NodeJs and PhantomJs directly or am I better going with StdIn/StdOut? 我在文档中找不到引用,但由于PhantomJs现在为2.1,是否可以使用WebSocket直接连接NodeJs和PhantomJs,还是最好使用StdIn / StdOut?

I'd like to skip the step of spawning a webserver plus a fake webpage to catch the events like I've seen on many github. 我想跳过生成网络服务器和伪造网页的步骤,以捕获类似我在许多github上看到的事件。 If I can I would avoid those ninja tricks. 如果可以的话,我会避免那些忍者把戏。

You really don't need WebSockets or the Web Server module. 您确实不需要WebSockets或Web Server模块。

There are basically two ways to use PhantomJS from node.js: 从node.js使用PhantomJS基本上有两种方法:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM