Skip to content

Quickstart (5 min)

What are we going to do?

Create real-time text editor between two peers.

  1. Account setup.
  2. Run a demo locally.

Let’s get started.

1. Your Account

Sign up for a PulseBeam account and get an api_key and api_secret.

  1. Go to pulsebeam.dev
  2. Create and account if you don’t have one
  3. Create a project, name your project
  4. Create a keypair on your project, give your keypair a name, e.g. demokey
  5. Store those keys!

2. Serve

Now that you’ve created your account and obtained your API credentials, let’s set up your local development environment.

You will need npm and node.js installed on your system. If you don’t have them, see installation instructions

Terminal window
git clone [email protected]:PulseBeamDev/pulsebeam-js.git
cd pulsebeam-js/demo-cdn
npm i
export PULSEBEAM_API_KEY="kid_..."
export PULSEBEAM_API_SECRET="sk_..."
npm run start

3. See it

  • Go to your browser open two tabs:
  • On the second tab enter peer-29 in the first text box. Then click connect.
  • Type text in the bottom text box. Changes will synchronize between peers in real-time using WebRTC data channels.

Congratulations!

You’ve set up a real-time peer-to-peer connection using PulseBeam. Checkout ‘what happened’ in the next page. Explore the logs, experiment with the demo, and take the next step by using PulseBeam in your applications.

Troubleshooting

  • Check your environment variables with echo $PULSEBEAM_API_KEY && echo $PULSEBEAM_API_SECRET
  • Port 3000 is already in use (Error: listen EADDRINUSE: address already in use :::3000) close other process or change port.
  • Something odd? Check you node version with node -v and npm -v. If older than 23.5.0 & 11.0.0 try nvm use node or nvm use 23.5
  • Something else? Checkout logs in browser console or contact us!