Skip to content

Instantly share code, notes, and snippets.

@Prosen-Ghosh
Created January 22, 2023 14:54
Show Gist options
  • Save Prosen-Ghosh/869784ee99d50410a76a6a611f88ab55 to your computer and use it in GitHub Desktop.
Save Prosen-Ghosh/869784ee99d50410a76a6a611f88ab55 to your computer and use it in GitHub Desktop.
const Redis = require("ioredis");
const redis = new Redis();
app.post("/send", async (req, res) => {
const message = req.body.message;
await redis.rpush("messages", message);
res.send("Message sent!");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment