21 lines
723 B
JavaScript
21 lines
723 B
JavaScript
require('dotenv').config();
|
|
const mikrotik = require('./services/mikrotikService');
|
|
|
|
async function test() {
|
|
console.log("Testing Mikrotik Interface Retrieval...");
|
|
try {
|
|
const interfaces = await mikrotik.getInterfaces();
|
|
console.log(`Found ${interfaces.length} interfaces.`);
|
|
if (interfaces.length > 0) {
|
|
console.log("Example Interface:", interfaces[0]);
|
|
// Check for specific commonly named interfaces if possible, or just dump first one
|
|
const ether1 = interfaces.find(i => i.name === 'ether1');
|
|
if (ether1) console.log("Ether1 Stats:", ether1);
|
|
}
|
|
} catch (error) {
|
|
console.error("Test Failed:", error);
|
|
}
|
|
}
|
|
|
|
test();
|