https://github.com/mosluce/nestjs-amqplib
https://github.com/mosluce/nestjs-amqplib
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mosluce/nestjs-amqplib
- Owner: mosluce
- Created: 2021-01-31T22:55:04.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-06T09:51:48.000Z (over 4 years ago)
- Last Synced: 2024-04-16T17:38:07.503Z (about 1 year ago)
- Language: TypeScript
- Size: 589 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
A progressive Node.js framework for building efficient and scalable server-side applications.
## Description
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
## Installation
```bash
$ npm install @ccmos/nestjs-amqplib
```## Quick Start
```js
// import
import { Module } from '@nestjs/common';
import { AmqplibModule } from '@ccmos/nestjs-amqplib';@Module({
imports: [
AmqplibModule.forRoot({
url: 'amqp://localhost'
}),
],
})
export class AppModule {}// service
import { Injectable } from '@nestjs/common';
import { AmqplibService } from '@ccmos/nestjs-amqplib';@Injectable()
export class MyService {
constructor(
private amqplib: AmqplibService,
) { }async helloWorld() {
await amqplib.sendToQueue('testQueue', { hello: 'queue' });
await service.publish('testExchange', 'testRoutingKey', {
hello: 'exchange',
});}
}
```## License
Nest is [MIT licensed](LICENSE).