Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.18 KB

File metadata and controls

48 lines (31 loc) · 1.18 KB

WebSocket Demo

This demo shows how to quickly set up a Node.js project that connects to Vybe Websocket.

Getting Started

  1. Clone the repository

     git clone https://github.com/vybenetwork/websocket-demo-node.git
     
     cd websocket-demo-node
  2. Install dependencies

    Using npm:

    npm install

    Or using Yarn:

    yarn
  3. Configure environment variables

    •Copy or rename the file .env.example to .env.

    •Update any required variables inside .env (e.g., WS_URL, API_KEY, etc.).

  4. Run the demo

    node index.js

The script will start the WebSocket connection using the variables you set in .env.

Files

•	index.js: Main entry point for establishing the WebSocket connection.

•	.env.example: Example environment variables file (copy this to .env and fill in your own values).

•	.gitignore: Ignores common Node.js artifacts and the .env file so you don’t accidentally commit secrets.

That’s it! You’re ready to connect to and experiment with your Vybe WebSocket server.

Contact support here

Docs: https://docs.vybenetwork.com/docs/websockets