Initial project structure
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import * as amqp from "amqplib";
|
||||
|
||||
|
||||
export class Rabbit {
|
||||
|
||||
connection!: amqp.ChannelModel;
|
||||
|
||||
channel!: amqp.Channel;
|
||||
|
||||
|
||||
async connect(){
|
||||
|
||||
this.connection =
|
||||
await amqp.connect(
|
||||
"amqp://manager:gigi1337@192.168.1.74"
|
||||
);
|
||||
|
||||
|
||||
this.channel =
|
||||
await this.connection.createChannel();
|
||||
|
||||
|
||||
console.log(
|
||||
"RabbitMQ verbunden"
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user