Skip to main content

Get started with Node.js

Connect Node.js programs to an IOSignal server to build bots, bridges to other systems, automation scripts and virtual devices. The same iosignal package contains the server too. If you are new, read core concepts in five minutes first; tags, delivery types and the home channel are the same in every environment.

1. Install​

Node.js 22.16.0 or later is required.

npm install iosignal

2. First connection​

In the five-minute quickstart, run a server, a receiver and a sender in three terminals. When the message appears in the receiver's terminal, it works. Then put subscribing and sending into one program with Build a Node.js client.

3. What differs in Node.js​

  • Imports: import by name, as in import { IO, Server } from 'iosignal'. This differs from the browser's iosignal/browser/esm/io.js.
  • The server is in the same package: new Server({ port: 7777 }) starts a server in one line. For operations, see Get started with a server.
  • TCP is possible too: to connect over the same TCP port as Arduino instead of WebSocket, use IOCongSocket (cong://host:port). Client API
  • Process lifetime: a lost connection reconnects automatically. Call stop() (no more reconnecting) or destroy() so the process can exit.
  • Acting as a device: a Node.js program that answers #search and sends $name, $ui and $state appears in remocon.kr as a device. Build a device (app.iosignal.net compatible): Node.js example

4. Build guides​

What you want to buildPages
A bot that listens on a channel and answersBuild a Node.js client, JS subscriptions and lifecycle
A virtual device the web app controlsBuild a device (app.iosignal.net compatible)
Your own serverRun a server
A game the server judgesGet started with games
Looking up methods and eventsClient API

5. Tools​

For connecting and testing from a terminal without code:

6. When you are stuck​