Netconfetti 🎉
It's always a party with NetConf
Netconfetti is a Javascript client for the NetConf protocol.
Example
const netconfetti = require('@128technology/netconfetti');
async function main() {
const client = new netconfetti.Client();
await client.connect({
host: '127.0.0.1',
username: 'admin',
password: 'admin',
port: 22
});
const configResponse = await client.rpc('get-config');
console.log(configResponse.data)
const doThingsResponse = await client.rpc({
'do-things': {
$: {
xmlns: 'http://special-namespace-here-if-required'
},
'param1': 'hello',
'param2': 'goodbye'
}
});
console.log(doThingsResponse.data);
}
main().then(
() => process.exit(0),
err => {
console.error(err);
process.exit(1);
});