@tak-ps/node-tak
v8.1.0
Published
Lightweight JavaScript library for communicating with TAK Server
Downloads
581
Maintainers
Readme
Lightweight JavaScript library for managing TAK TLS connections for streaming CoT data
Installation
NPM
To install node-tak
with npm run
npm install @tak-ps/node-tak
Usage Examples
Basic Usage
import TAK from '@tak-ps/node-tak';
const tak = await TAK.connect('ConnectionID', new URL('https://tak-server.com:8089'), {
key: conn.auth.key,
cert: conn.auth.cert
});
tak.on('cot', async (cot: CoT) => {
console.error('COT', cot); // See node-cot library
}).on('end', async () => {
console.error(`Connection End`);
}).on('timeout', async () => {
console.error(`Connection Timeout`);
}).on('ping', async () => {
console.error(`TAK Server Ping`);
}).on('error', async (err) => {
console.error(`Connection Error`);
});