Skip to content

joaaobr/starn

Repository files navigation

Starn

Starn is a simple and fast messaging system.

Starn is an MIT-licensed open source project.

Getting Started

Installation

  npm install starn  

or

  yarn add starn

Usage

How to create new Starn

  import { Starn } from 'starn';

  const starn = new Starn({
    port: 2222,
    host: "localhost",
    topics: ["A"]
  });

How to create new Sender

  const sender = starn.sender()
  
  sender.sendMessage("A", "Hello A");

How to create new Client

  const client = starn.client();
   
   client.getMessage("A", data => console.log(data));

LICENSE

MIT