Files
rondevu-demo/TEST_README.md
Bas van den Aakster b9c07aeb5a Update for simplified client API and add Node.js hosting guide
Changes:
- Update App.jsx to use Rondevu.connect() instead of new + initialize()
- Update publishService to use 'service' parameter instead of 'serviceFqn'
- Remove explicit claimUsername() calls (now implicit)
- Add comprehensive NODE_HOST_GUIDE.md for hosting WebRTC services in Node.js
- Update README with Node.js hosting section

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-12 21:57:11 +01:00

1.6 KiB

Running Node.js Tests

The test-connect.js script demonstrates connecting to a Rondevu service from Node.js and sending a WebRTC data channel message.

Requirements

  • Node.js 19+ (or Node.js 18 with --experimental-global-webcrypto flag)
  • wrtc package (for WebRTC support in Node.js)

Installation

The wrtc package requires native compilation. Due to build complexities, it's not included as a regular dependency.

Install wrtc manually:

# Install build tools (if not already installed)
# On Ubuntu/Debian:
sudo apt-get install build-essential python3

# On macOS:
xcode-select --install

# Install wrtc
npm install wrtc

Note: Installation may take several minutes as it compiles native code.

Alternative: Test without WebRTC

If wrtc installation fails, you can still test the signaling layer without actual WebRTC connections by modifying the test script or using the browser demo at https://ronde.vu

Running the Test

Once wrtc is installed:

npm test

This will:

  1. Connect to the production Rondevu server
  2. Look for @bas's chat service
  3. Establish a WebRTC connection
  4. Send "hello" via data channel

Troubleshooting

wrtc installation fails

Try installing dependencies:

npm install node-pre-gyp node-gyp
npm install wrtc

"crypto.subtle is not available"

You need Node.js 19+ or run with:

node --experimental-global-webcrypto test-connect.js

Can't find @bas's service

The test looks for chat:1.0.0@bas. If @bas is not online or the service expired, the test will fail. You can modify the TARGET_USER constant to test with a different user.