1.0.1 • Published 3 years ago
@rodabafilms/nodecore-nano v1.0.1
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();