1.0.1 • Published 3 years ago

@rodabafilms/nodecore-nano v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

NodeCore-Nano

A client library used to interface with NanoCore 1.2.2.0 servers

Installation

Use npm to install the library

npm install --save @rodabafilms/nodecore-nano

Build from source

Use git to pull the package and build using tsc

git clone https://github.com/RoDaBaFilms/nodecore-nano
cd nodecore-nano 
npm install
npx tsc

Install from source

Use npm install with the path to your cloned directory

npm install <path-to-nodecore-nano>

Usage

const { NodeCoreClient } = require('@rodabafilms/nodecore-nano');

const client = new NodeCoreClient({
    hostname: '127.0.0.1',
    port: 1604
});

// Add event handlers here

// Example event: Reconnect on socket error
client.on('shutdown', e => {
    if (e.error) {
        e.cancel(); 
    }
});

client.connect();

License

GNU General Public License v3.0

1.0.1

3 years ago

1.0.0

3 years ago