Created
January 22, 2023 14:54
-
-
Save Prosen-Ghosh/869784ee99d50410a76a6a611f88ab55 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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