官术网_书友最值得收藏!

Installing node-xmpp-client

To interact with an XMPP server, we will use a popular Node.js project called node-xmpp-client. This is a JavaScript implementation of an XMPP client that can run on both the server side or in the browser using Browserify (http://browserify.org/).

First, we will create a new folder for our project and install the library there. To do this, open a terminal window and type the following commands:

cd ~
mkdir xmpp-echo-bot
cd xmpp-echo-bot
npm install node-xmpp-client

This will install node-xmpp-client inside a new node_modules directory. At the time this book is published, node-xmpp-client should be at version 3.0.0 or greater.

Now we have our library installed, we start building our echo bot!

主站蜘蛛池模板: 上高县| 拜泉县| 柏乡县| 平塘县| 衡阳县| 湟中县| 金山区| 安义县| 东阿县| 龙游县| 仙游县| 宜城市| 武陟县| 宜黄县| 虎林市| 枣强县| 渭源县| 石嘴山市| 麻江县| 卓尼县| 将乐县| 山丹县| 宜城市| 丰台区| 乌鲁木齐县| 徐水县| 延长县| 遂川县| 上思县| 普陀区| 昭觉县| 讷河市| 兴宁市| 伽师县| 丰宁| 平舆县| 山西省| 喜德县| 常德市| 连州市| 洛隆县|