This JavaScript application communicates with a JMS server via Kaazing WebSocket Gateway. The application publishes text messages to the server and listens for the messages from the broker over WebSocket.
- Node.js version 4.4 and higher
- NPM v 3.9.5 and higher
To update NPM to the latest version:
sudo npm install npm -g
- In a terminal, navigate to the folder for a tutorial, such as
javascript.client.tutorials/jms
. - Enter
npm install
to build the tutorial. - Enter
node server.js
to run the included Node.js server component (server.js). - In a browser, open the URL
http://localhost:3000/
.
If you want to run the demo without using npm, open index.html
in a browser. It doesn't need to be hosted, you can open it from the filesystem.
Note: To test basic authentication in the app use the URL wss://demos.kaazing.com/jms-auth
for location.
username: tutorial
password: tutorial
Connect using the default URL, wss://demos.kaazing.com/jms
, which will connect to a hosted Kaazing WebSocket Gateway for demo purposes.
Change the connect URL to that of your installed gateway. For example: ws://localhost:8000/jms
Documentation on how to create Kaazing JavaScript JMS applications from scratch can be found here
API Documentation for Kaazing JavaScript WebSocket JMS Client library is available: