Skip to content

Commit

Permalink
Consumer final
Browse files Browse the repository at this point in the history
  • Loading branch information
XDPVD committed Jul 3, 2021
1 parent 866378f commit fb3d55b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ const routerMensajes = require("./routes/mensajes");
// Initializations
const app = express();
require('dotenv').config();

console.log(process.env.KAFKA_HOST)

require("./database");
require("./kafka");

Expand Down
1 change: 1 addition & 0 deletions kafka.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ consumer.on("message", function (message) {
obj.telephone = Number(obj.telephone)

const newMessage = new Message(obj);
console.log(obj);
newMessage.save().then((res)=>console.log(res));
});

0 comments on commit fb3d55b

Please sign in to comment.