routeros-wrapper
v1.0.4
Published
Lightweight RouterOS API wrapper for Node.js (ESM)
Readme
Usage
import { MikrotikAPI } from 'routeros-wrapper';
const config = {
host: '192.168.88.1',
username: 'admin',
password: 'password'
};
const api = new MikrotikAPI(config);
await api.connect();
// Get system identity
const identity = await api.getSystemIdentity();
if (identity.isSuccess()) {
console.log('Router identity:', identity.getValue());
}
// Get interfaces
const interfaces = await api.getInterfaces();
if (interfaces.isSuccess()) {
console.log('Interfaces:', interfaces.getValue());
}
await api.disconnect();