Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pirumu/ksqldb
KsqlDB Client module for Nest framework (node.js)
https://github.com/pirumu/ksqldb
Last synced: 29 days ago
JSON representation
KsqlDB Client module for Nest framework (node.js)
- Host: GitHub
- URL: https://github.com/pirumu/ksqldb
- Owner: pirumu
- License: mit
- Created: 2022-09-06T08:33:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-08T06:48:08.000Z (over 2 years ago)
- Last Synced: 2024-11-04T16:07:15.122Z (about 2 months ago)
- Language: TypeScript
- Size: 34.2 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KsqlDB Client for Nestjs ![logo](https://docs.ksqldb.io/en/latest/img/logo.png)
## Install
```
# npm
npm install @nattogo/ksqldb
# yarn
yarn add @nattogo/ksqldb
```## Usage
```ts
// app.module.ts
import { KsqlDBModule } from '@nattogo/ksqldb';@Module({
imports: [
KsqlDBModule.register({
url: 'http://localhost:8088',
timeout: 3000,
}),
],
})
export class AppModule {}
``````ts
//app.service.ts
import { KsqldbService } from '@nattogo/ksqldb';
import { Injectable } from '@nestjs/common';@Injectable()
export class AppService {
constructor(private readonly ksqldbService: KsqldbService) {
}pushQuery() {
this.ksqldbService.pushQuery('SELECT * FROM STREAM EMIT CHANGES;').subscribe({
next: (data) => console.log(data),
});
}
}```