npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nikki.node

v2.2.2

Published

nikki.node client library for nikki.build service

Readme

nikki.node

Official Nodejs client library for the nikki.build service.

👉 Website: https://nikki.build

Overview


nikki.node allows you to seamlessly connect your Nodejs services to the nikki.build platform. Designed for reliability and speed, this library provides a robust base for real-time data streaming and node-to-node communication.

  • Reliable Connectivity: Built-in connection management.

  • JSON Native: Easy-to-use JSON data handling.

  • Lifecycle Events: Built-in hooks for connection, data, and error states.

  • TypeScript Ready: Full type definitions included.

  • Extensible: Built around a base class for custom logic.

The library is built with TypeScript and supports Nodejs >=16.


Installation

Install the package via NPM:

npm install nikki.node

Quick Start

1. Create Your Service

Extend the nikkiServiceBase class to handle your custom logic.

import { nikkiServiceBase } from "nikki.node";

export class MyService extends nikkiServiceBase {
    onConnect(): void {
        console.info("Connected to nikki.build");
    }
    onDisconnect(): void {
        console.info("Disconnected from nikki.build");
    }
    onData(data: any): void {
        console.info("Received data:", data);
    }
    onError(errMsg: string): void {
        console.error("Error:", errMsg);
    }
}

📁 Configuration Files (Required)

Make sure the required configuration files are available at the root of your project. The library will automatically attempt to load these files during initialization.

✅ Required Files

Place the following files at the root path:

  • /serviceDef.json
  • /serviceToken.json

These files are mandatory for establishing a connection. The library expects them at the root level (same level as your HTML or entry file). If they are missing or invalid:

  • Connection will fail

2. Start the Connection

Create an instance and start the connection:

 const srvInst = new MyService()

// Connect to nikki.build
srvInst.start()

3.📤 Sending Data

Send JSON data to other connected nodes:

srvInst.sendData({ message: "Hello World" })

Example with interval:

let count = 0

const interval = setInterval(() => {
    count++
    srvInst.sendData({ count })
    console.info("Sending data:", count)
}, 3000)

4. To disconnect:

srvInst.stop()

🔄 Lifecycle Methods

Override these methods in your service class:

| Method | Description | |--------|------------| | onConnect() | Called when the connection is successfully established to nikki.build | | onDisconnect() | Called when the connection is closed or lost | | onError(errMsg) | Called whenever an error occurs | | onData(jsonData) | Called when data is received from another connected node |

🛠 Available Methods

| Method | Description | | -------------------- | --------------------------------- | | start() | Connect to nikki.build | | stop() | Disconnect from nikki.build | | sendData(jsonData) | Send JSON data to connected nodes |

⚠️ Rate Limits (Friendly Reminder)


To keep everything running smoothly on the platform, there are a few limits to keep in mind:

  • Message Speed: Please don’t send more than 2 messages per second.
    (Your service might be fast… but let’s not overwhelm things 😄)

  • Throttling: If limits are exceeded, your connection may be temporarily throttled or disconnected.

  • Best Practice: Design your service with these limits in mind — batching, debouncing, or simple timing controls work great.

Play nice, and everything stays happy 🚀

Example Use Cases

  • Real-time event processors

  • IoT Data streaming services

  • Monitoring and Alerting services

  • Backend integrations with nikki.build

Requirements

  • Node.s: >= 16

  • Dependencies: rxjs, ws

Documentation & Support

For full platform documentation and advanced service configuration, visit:

👉 https://nikki.build

License

ISC