This guide will help you get started with logdb-client
in a few easy steps
To begin, you'll need to install package
via npm
$ npm i logdb-client
via yarn
$ yarn add logdb-client
via bun
$ bun i logdb-client
Here's a simple example to get you started
First, import the library into your project
import { LogDB } from 'logdb-client' // ESM
// or
const { LogDB } = require('logdb-client') // CJS
Here's a basic example demonstrating how to use logdb-client
import { LogDB } from 'logdb-client'
const logDB = new LogDB({
url: 'https://your-logdb-server.com',
token: 'secret-token-here',
})
logDB.on('event', (event: EventContext) => {
console.log(event.id, event.type)
})
logDB.listen() // run for listen events
Go to documentation for more.